The moment I added the android support annotations to my dependencies
compile \'com.android.support:support-annotations:20.0.0\'
I got this erro
Solved this exact issue in a Cordova project that used the facebook plugin. I was able to successfully build by commenting out this line from platforms\android\project.properties
, as shown:
# cordova.system.library.1=com.android.support:support-v4:+
And by commenting out this line from platforms\android\build.gradle
, as shown:
// compile "com.android.support:support-v4:+"
Then doing the build. The problem started when I installed (katzer/cordova-plugin-local-notifications) which added these lines, but it created a conflict since the library it was adding to the build was already part of the facebook plugin build.
Another reason that messages such as these can come up in Android Studio when building and launching can be the cause of application tags in your libraries.
If you have several Android Library projects that you imported as modules. Go into those projects and remove the <application> ... </application>
tags and everything between them. These can cause issues in the build process along with the support library issues already mentioned.
If you import AppCompat
as a library project and you also have android-support-annotations.jar
in libs elsewhere, make sure to import everywhere AppCompat
library only (it already includes this annotations lib). Then delete all android-support-annotations.jar
to avoid merging multiple versions of this library.
From /platforms/android/libs/ delete android-support-v4.jar. It works for me.
I managed to fix this issue. The reason was that I included the android support library 19.0.0 as a dependency, but 19.1.0 is required. See here for more information
So it has to be
dependencies {
compile 'com.android.support:support-v4:19.1.0'
compile 'com.crashlytics.android:crashlytics:1.+'
compile 'com.android.support:support-annotations:20.0.0'
}
For me the reason was the new data-binding lib
com.android.databinding:dataBinder:1.0-rc2
it somehow used a conflicting version of the annotations lib, which I could not force with
configurations.all {
resolutionStrategy {
force group: 'com.android.support', name: 'support-v4', version: '23.1.0'
force group: 'com.android.support', name: 'appcompat-v7', version: '23.1.0'
force group: 'com.android.support', name: 'support-annotations', version: '23.1.0'
}
}
but the new rc3
and rc4
versions seem to have fixed it, so just use those versions