試圖添加兩個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或外部運行 –