All support libraries must use the exact same version specification - android

I getting alll support libraries must use the same exact version.
but I'm using the same version.
The error i'm getting.
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 24.2.1, 23.0.1. Examples include com.android.support:animated-vector-drawable:24.2.1 and com.android.support:cardview-v7:23.0.1 less...
My Build.gradle file
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:animated-vector-drawable:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'de.hdodenhof:circleimageview:1.2.1'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
compile files('libs/zxing-2.1.jar')
compile files('libs/ksoap2-android-assembly-2.5.7-jar-with-dependencies.jar')
compile 'com.github.siyamed:android-shape-imageview:0.9.+#aar'
//Citrus
compile 'com.citruspay.sdk:payment-sdk:4.1.3'
compile 'com.journeyapps:zxing-android-embedded:3.4.0'
compile 'me.dm7.barcodescanner:zbar:1.8.2'
compile project(':qrpaylib')
}
can you help me in this scenario?

Related

Build failed with bytecode error in Android Studio

I have this error:
I have enabled multidex but still it gives me multidex files define issues.
compile fileTree(include: ['*.jar'], dir: 'libs')
// Navigation Drawer Library
compile('com.mikepenz:materialdrawer:5.3.0#aar') {
transitive = true
}
// Debugger Tools libraries
debugCompile 'com.facebook.stetho:stetho:1.2.0'
debugCompile 'com.parse:parseinterceptors:0.0.2'
//Google, Inc (Play services) Libraries
compile 'com.google.android.gms:play-services-maps:9.2.0'
// Google, Inc (Support) Libraries
compile 'com.android.support:support-v13:25.1.0'
compile 'com.android.support:support-v4:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:multidex:1.0.1'
compile 'org.florescu.android.rangeseekbar:rangeseekbar-library:0.3.0'
// Parse Server API SDK
compile project(':ParseUI-Widget')
compile 'com.parse:parse-android:1.13.1'
compile 'com.parse.bolts:bolts-android:1.4.0'
compile 'com.github.tgio:parse-livequery:1.0.3'
compile 'com.parse:parsefacebookutils-v4-android:1.10.3#aar'
// Facebook, Inc SDKs
compile 'com.facebook.android:audience-network-sdk:4.18.0'
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile 'com.facebook.android:account-kit-sdk:4.+'
// Libraries for loading images
compile 'com.facebook.fresco:imagepipeline-okhttp3:0.11.0+'
compile 'com.facebook.fresco:fresco:1.0.0'
// Location Helper Library
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit:converter-gson:2.0.0-beta1'
// Time library
compile 'joda-time:joda-time:2.9.7'
// Accelaration library
//compile 'com.neumob:neumob-android:3.2.4'
// Others
compile 'com.skyfishjy.ripplebackground:library:1.0.1'
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile files('libs/mint-4.4.0.jar')
I have added build.gradle file.
I don't know how to solve Multidex issue in Android. My app has lots of SDKs integration, I went through lots of tutorials and blogs. I got so many solutions. One of them is below mentioned as part of my gradle.
apply plugin: 'com.google.gms.google-services'
classpath 'com.google.gms:google-services:3.1.1'

Gradle com.android.support and com.google.android.gms library conflict

I'm working on a Firebase chat app inside my main project and I added Firebase dependencies to my build.gradle, but then I got this message after sync:
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes.) Found versions 25.3.1, 25.0.0, 23.4.0. Examples include com.android.support:animated-vector-drawable:25.3.1 and com.android.support:palette-v7:25.0.0
on
compile 'com.android.support:appcompat-v7:25.3.1'
and
All com.google.android.gms libraries must use the exact same version specification (mixing versions can lead to runtime crashes.) Found versions 9.8.0, 10.2.6. Example include com.google.android.gms:play-services-auth-base:9.8.0 and com.google.android.gms:play-services-ads-lite:10.2.6
on
compile 'com.google.android.gms:play-services-ads:10.2.6'
Here is my dependencies in build.gradle (Module:app):
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile files('lib/mysql-connector-java-5.1.6.jar')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services-ads:10.2.6'
compile 'com.android.support:design:25.3.1'
testCompile 'junit:junit:4.12'
//Chat dependencies
compile 'com.android.support:design:25.3.1'
compile 'com.firebaseui:firebase-ui:0.6.2'
compile 'com.github.hani-momanii:SuperNova-Emoji:1.0'
}
according to your build.gradle file,
duplicate line of code found
compile 'com.android.support:design:25.3.1'
remove one and try .

getAdapterPosition() is not found as a method

I recently uprated to Android Studio 2.3 and not the getAdapterPosition (RecyclerView) cannot be found. I saw on the web that the reason for that is the support library version. But I am not sure how to solve it still. My support:appcompat-v7:25.2.0' version is the latest possible (e.g. above 21). I don't understand why the method is not found. Any advice, please?
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile files('libs/wekaSTRIPPED.jar')
compile('com.mikepenz:materialdrawer:5.8.1#aar') { // Material Drawer
transitive = true
}
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.jakewharton:butterknife:8.5.1'
compile 'com.google.dagger:dagger:2.9'
compile 'com.github.wendykierp:JTransforms:3.1'
compile 'com.afollestad.material-dialogs:commons:0.9.3.0'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.github.paolorotolo:appintro:4.1.0'
compile 'com.android.support:support-v4:25.2.0'
compile 'com.android.support:design:25.2.0'
compile 'com.borax12.materialdaterangepicker:library:1.9'
compile 'com.evernote:android-job:1.1.7' // Scheduling library
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
annotationProcessor 'com.google.dagger:dagger-compiler:2.9'
Can you please check you are using this method in ViewHolder Class?
getAdapterPostion() is the method of RecyclerView.ViewHolder.
You need to make sure you are using this method inside the class extending RecyclerView.ViewHolder
compile 'com.android.support:recyclerview-v7:25.2.0'
may be missing that line ???
Please add this dependency:
compile 'com.android.support:recyclerview-v7:23.3.0'
Probably you have to use buildToolsVersion 25.2.0 too, and in my case the gradle showed me and error:
All com.android.support libraries must use the exact same version
specification (mixing versions can lead to runtime crashes). Found
versions 25.2.0, 25.0.0. Examples include
com.android.support:animated-vector-drawable:25.2.0 and
com.android.support:customtabs:25.0.0
To solve this I have had to add this line compile 'com.android.support:customtabs:25.2.0' forcing to use this version for customtabs.
Before:
// android support
compile 'com.android.support:recyclerview-v7:25.2.0'
compile 'com.android.support:cardview-v7:25.2.0'
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:design:25.2.0'
After:
// android support
compile 'com.android.support:recyclerview-v7:25.2.0'
compile 'com.android.support:customtabs:25.2.0'
compile 'com.android.support:cardview-v7:25.2.0'
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:design:25.2.0'
If you have an error like this, I recommend you to add the library that shows the error with the version you want.

In Android Studio, all com.android.support libraries must use the exact same version

I recently upgraded to Android Studio 2.3. and this error started appearing:
Here is my list of libraries:
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile files('libs/wekaSTRIPPED.jar')
compile('com.mikepenz:materialdrawer:5.8.1#aar') { // Material Drawer
transitive = true
}
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.jakewharton:butterknife:8.5.1'
compile 'com.google.dagger:dagger:2.9'
compile 'com.github.wendykierp:JTransforms:3.1'
compile 'com.afollestad.material-dialogs:commons:0.9.3.0'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.github.paolorotolo:appintro:4.1.0'
compile 'com.android.support:support-v4:25.2.0'
compile 'com.android.support:design:25.2.0'
compile 'com.borax12.materialdaterangepicker:library:1.9'
compile 'com.evernote:android-job:1.1.7' // Scheduling library
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
annotationProcessor 'com.google.dagger:dagger-compiler:2.9'
Any idea on how to solve this?
I had the problem like you when updating to Android Studio 2.3. I solved by I searched in my project all support library using 25.1.1 (I searched 25.1.1) and replace with 25.2.0. I think many code using 25.1.1, in your library and your project.
You can open external lib in your project to show all dependency. You should update to new library version(lib using support library):
For ex:
https://github.com/mikepenz/MaterialDrawer - new version is 5.8.2 using 25.2.0

Is there a resolution for this conflict between the material design support library and the gms:wallet library over the field "rippleColor"?

In my project, when I try and add the latest design support library I get this error which appears to be in conflict with the wallet library:
D:\Android Stuff\ReleaseMEdia\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-wallet\8.1.0\res\values\wallet_colors.xml
Error:(2) Attribute "rippleColor" has already been defined
Here is the list of all my gradle dependencies below:
compile 'com.google.android.gms:play-services-wallet:8.1.0'
compile 'com.google.android.gms:play-services-ads:7.8.0'
compile 'com.google.code.gson:gson:2.2.+'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.jakewharton:butterknife:5.1.2'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
compile 'com.balysv:material-ripple:0.9.0-SNAPSHOT#aar'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.jpardogo.materialtabstrip:library:1.0.6'
compile 'com.google.api-client:google-api-client-android:1.19.0'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.github.gabrielemariotti.cards:cardslib-core:2.0.1'
compile 'com.github.gabrielemariotti.cards:cardslib-cards:2.0.1'
compile 'com.github.gabrielemariotti.cards:cardslib-recyclerview:2.0.1'
compile 'se.emilsjolander:stickylistheaders:2.1.5'
compile 'com.squareup.picasso:picasso:2.4.0'
compile 'com.android.support:palette-v7:23.1.0'
compile 'com.nispok:snackbar:2.11.+'
compile 'com.uwetrottmann:trakt-java:4.3.1'
compile 'com.melnykov:floatingactionbutton:1.3.0'
compile 'com.android.support:customtabs:23.1.0'
compile 'com.android.support:multidex:1.0.0'
compile 'jp.wasabeef:picasso-transformations:1.2.1'
compile 'com.android.support:design:23.1.0'
Everything syncs fine until I add the design library at the bottom, then I am presented with this message when trying to sync gradle.
I've seen a few other people online with this issue but it doesn't look like anyone has a resolution yet. Can anyone provide any insight?
It looks like this has nothing to do with wallet, but instead is an issue with the version of com.balysv:material-ripple you are using as per this issue.
The library's Github page shows that the latest version (which includes the above fix) is:
compile 'com.balysv:material-ripple:1.0.2'

Categories

Resources