gradle配置时报错

大白配小猪 2020-05-05

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、离线下载好了以后,导入项目里面。

相关推荐