试图添加两个maven仓库,但似乎无法得到解决。
找不到计算器上的任何信息,并想知道什么是在摇篮解决依赖的标准方式无法解决:de.hdodenhof:circleimageview:2.1.0
根的build.gradle
buildscript {
repositories {
mavenCentral()
// maven { url "https://mvnrepository.com/artifact/de.hdodenhof/circleimageview" }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
模块的build.gradle
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.3.0'
// compile files('libs/CircleImageView-master/gradle/wrapper/gradle-wrapper.jar')
compile 'de.hdodenhof:circleimageview:2.1.0'
}
失败要解决:de.hdodenhof:circleimageview:2.1.0
是的,根gradle具有存储库,并且模块gradle具有依赖关系。我已更新了我的主帖。 我已经使用Android Studio中的干净版本,我相信它相当于gradlew clean,但只要我想清楚,就会尝试使用它。 –
不,它不相似,因为'--refresh-dependencies'使Gradle缓存无效并强制再次下载所有依赖项。 –
应该在Android Studio或外部运行 –