I'm trying to import both android support libraries. I'm trying to implent GoogleMaps AP2 into my Android Application. Therefore I need both libraries. I'm using AndroidStudio and Gradle.
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
apt "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"
compile 'com.android.support:appcompat-v7:21.0.+'
// compile 'com.google.android.gms:play-services:6.1.+'
compile "com.android.support:support-v13:18.0.+"
compile "com.loopj.android:android-async-http:1.4.5"
repositories {
mavenCentral()
}
compile "com.github.chrisbanes.actionbarpulltorefresh:library:+"
compile 'joda-time:joda-time:2.5'
}
The error is:
Module version com.android.support:support-v13:18.0.0 depends on libraries but is not a library itself
You have to use the latest version of support-v13:21.0.+
You have this error because both appcompat and support-v13 depends on support-v4 and their is a version conflict.
Not the best error by the way.
Finally this code is working for me in:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
apt "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"
compile 'com.android.support:support-v4:20.0.+'
compile "com.android.support:appcompat-v7:20.0.+"
compile "com.android.support:support-v13:20.0.+"
compile 'com.google.android.gms:play-services:6.1.+'
compile "com.loopj.android:android-async-http:1.4.5"
repositories {
mavenCentral()
}
compile "com.github.chrisbanes.actionbarpulltorefresh:library:+"
compile 'joda-time:joda-time:2.5'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With