我有一个看起来像这样的依赖项:
dependencies {
apt 'io.sweers.barber:barber-compiler:1.3.0'
compile 'io.sweers.barber:barber-api:1.3.0'
}
这种依赖确实存在于 jcenter 和 mavenCentral 中,但是每当 gradle 解析它时,它使用不正确的 artifactId(删除“barber-”前缀)。
Error:Could not find io.sweers.barber:api:1.3.0.
Searched in the following locations:
https://jcenter.bintray.com/io/sweers/barber/api/1.3.0/api-1.3.0.pom
https://jcenter.bintray.com/io/sweers/barber/api/1.3.0/api-1.3.0.jar
https://maven.fabric.io/public/io/sweers/barber/api/1.3.0/api-1.3.0.pom
https://maven.fabric.io/public/io/sweers/barber/api/1.3.0/api-1.3.0.jar
file:/Users/hsweers/dev/android/android-sdk/extras/android/m2repository/io/sweers/barber/api/1.3.0/api-1.3.0.pom
file:/Users/hsweers/dev/android/android-sdk/extras/android/m2repository/io/sweers/barber/api/1.3.0/api-1.3.0.jar
file:/Users/hsweers/dev/android/android-sdk/extras/google/m2repository/io/sweers/barber/api/1.3.0/api-1.3.0.pom
file:/Users/hsweers/dev/android/android-sdk/extras/google/m2repository/io/sweers/barber/api/1.3.0/api-1.3.0.jar
Required by:
MyAppProject.app:unspecified > io.sweers.barber:barber-compiler:1.3.0
如果依赖项可以正确解析为https://jcenter.bintray.com/io/sweers/barber/barber-api/1.3.0/barber-api-1.3.0.pom
如果有帮助,可以在此处找到该库:https ://github.com/hzsweers/barber