2017-07-17 88 views
-1

配置根项目“预备者”时发生问题。Gradle无法找到阴影插件

> Could not resolve all files for configuration ':classpath'. 
> Could not find com.github.jengelman.gradle.plugins:shadow:2.0.1. 

搜索在以下位置:

  file:/Users/lion-mane/.m2/repository/com/github/jengelman/gradle/plugins/shadow/2.0.1/shadow-2.0.1.pom 
     file:/Users/lion-mane/.m2/repository/com/github/jengelman/gradle/plugins/shadow/2.0.1/shadow-2.0.1.jar 
     https://repo1.maven.org/maven2/com/github/jengelman/gradle/plugins/shadow/2.0.1/shadow-2.0.1.pom 
     https://repo1.maven.org/maven2/com/github/jengelman/gradle/plugins/shadow/2.0.1/shadow-2.0.1.jar 

Required by: 
project : 
+1

什么是影子插件?你可以在https://mvnrepository.com/找到它吗? – pal

+0

@pal这是一个非常普通的图书馆。 https://github.com/johnrengelman/shadow –

回答

2

看起来你只是根据提供的搜索路径在你的仓库mavenCentral()

您需要改变JCenter。

buildscript { 
    repositories { 
     jcenter() 
    } 
+0

它的作品谢谢! –