gradle配置时报错

Posted zhangbojiangfeng

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了gradle配置时报错相关的知识,希望对你有一定的参考价值。

Warning:<i><b>root project ‘mlibmodel‘: Unable to build Scala project configuration</b>
Details: org.gradle.api.GradleException:
Cannot infer Scala class path because no repository is declared in root project ‘mlibmodel‘</i>


Warning:<i><b>project ‘:alg‘: Unable to build Scala project configuration</b>
Details: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ‘:alg:compileClasspath‘.
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve org.apache.spark:spark-core_2.11:2.1.1.
Required by:
project :alg
project :alg > project :api
project :alg > project :common
project :alg > project :mllib
project :alg > project :mllib > project :sparklib
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve org.apache.spark:spark-core_2.11:2.1.1.
Caused by: org.gradle.api.resources.ResourceException: Could not get resource ‘http://repo.maven.apache.org/maven2/org/apache/spark/spark-core_2.11/2.1.1/spark-core_2.11-2.1.1.pom‘.
Caused by: org.gradle.internal.resource.transport.http.HttpErrorStatusCodeException: Could not HEAD ‘http://repo.maven.apache.org/maven2/org/apache/spark/spark-core_2.11/2.1.1/spark-core_2.11-2.1.1.pom‘. Received status code 501 from server: HTTPS Required</i>

 

这个报错设置下载org.apache.spark:spark-core_2.11:2.1.1.这个失败,到=导致项目构建gradle失败。

可以:1、换一个链接下载或者公司内部库下载这个包

   2、离线下载好了以后,导入项目里面。

以上是关于gradle配置时报错的主要内容,如果未能解决你的问题,请参考以下文章

使用 Gradle 编译 Java 项目时报错: Could not find Tools.jar

错误记录Android Gradle 配置报错 ( gradle.properties 配置到 BuildConfig 中需要注意类型转换 | 位置: 类 BuildConfig )

gradle报错问题

错误记录Android Studio 中查看 Gradle 配置的方法源码 ( 配置 gradle-wrapper.properties 中版本为 gradle-x.x.x-all.zip )

开源项目运行时报错A problem was found with the configuration of task ‘:app:checkDebugManifest‘

错误记录Gradle 配置报错 ( Using different JDK locations on different processes might cause Gradle to spa )