当我同步gradle时出现此错误:
错误:Artifact' com.viewpagerindicator:library:2.4.1:library.aar'没找到。
我的gradle是:
apply plugin: 'com.android.application'
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
mavenCentral()
}
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:19.1.+'
compile 'com.mcxiaoke.volley:library:1.0.6@aar'
compile 'com.squareup.picasso:picasso:2.2.+'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.2@aar'
compile 'com.viewpagerindicator:library:2.4.1@aar'
compile files('libs/jsoup-1.8.1.jar')
}
我该怎么做?!
答案 0 :(得分:21)
卸下:
maven { url "http://dl.bintray.com/populov/maven" }
而不是
compile 'com.viewpagerindicator:library:2.4.1@aar'
添加:
compile 'com.mcxiaoke.viewpagerindicator:library:2.4.1@aar'
清理并同步gradle。
答案 1 :(得分:0)
allprojects {
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
jcenter()
mavenCentral()
}
}