I am using adobe creative sdk library in my photo editing application. When I add dependencies of this library in my application, it adds its necessary libraries in my project. It adds google play services base library version 9.4.0 which is not the latest version.So, problem is that when I add a google ads dependency in my project, it shows error as below:
Error:Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 11.8.0.
So how can I update the play services base library version? it is not showing in my Gradle file but its showing in my external libraries of the project as shown below.
Build.gradle dependencies:
implementation 'com.google.firebase:firebase-core:11.8.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
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'
})
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
testCompile 'junit:junit:4.12'
/* Add the CSDK framework dependencies (Make sure these version numbers are correct) */
// compile 'com.aviary.android.feather.sdk:aviary-sdk:3.6.3'
compile 'com.android.support:appcompat-v7:25.4.0'
compile 'com.adobe.creativesdk.foundation:auth:0.9.1251'
compile 'com.adobe.creativesdk:image:4.8.4'
compile 'com.localytics.android:library:4.0.1'
compile 'com.android.support:design:25.4.0'
compile 'com.android.support:multidex:1.0.2'
compile 'com.android.support:support-v4:25.4.0'
compile 'com.intuit.sdp:sdp-android:1.0.4'
compile 'com.github.bumptech.glide:glide:4.3.1'
compile 'com.google.android.gms:play-services-ads:11.8.0'
implementation 'com.android.support:support-v4:25.4.0'
External Libraries Directory
Related
I have been developing and working on my App, I then decided to build the APK I then got duplicate file error specifically talking about firebase zzc.class? which I could not find. I have seen duplicate file error before and sorted it out but this Firebase error has really slowed down my work because I have seen no specific answer to my issue.
Below are my dependencies
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 'com.android.support:appcompat-v7:25.+'
compile 'com.android.support:support-v4:25.+'
compile 'com.android.support:design:25.+'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.firebase:firebase-client-android:2.3.1'
compile 'com.google.firebase:firebase-storage:10.0.1'
compile 'com.firebaseui:firebase-ui:2.0.1'
compile 'org.apache.pdfbox:pdfbox:2.0.0'
compile 'net.igenius:customcheckbox:1.3'
compile 'com.roger.catloadinglibrary:catloadinglibrary:1.0.1'
testCompile 'junit:junit:4.12'
}
Then the error:
You are using different versions of the same libraries:
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.firebase:firebase-storage:10.0.1'
compile 'com.firebaseui:firebase-ui:2.0.1'
As you can read here there is a dependency between firebaseui and firebase libraries:
FirebaseUI Version Firebase/Play Services Version
2.3.0 11.0.4
2.2.0 11.0.4
2.1.1 11.0.2
2.0.1 11.0.1
Use the same version to avoid these issue.
Also there is no reason to use the old:
compile 'com.firebase:firebase-client-android:x.x.x'
Check the migration guide and use:
compile "com.google.firebase:firebase-database:X.X.X"
Keep in mind that the latest version requires the google maven repo:
allprojects {
// ...
dependencies {
// ...
maven {
url "https://maven.google.com" // Google's Maven repository
}
}
}
This is happening because you have a duplicate in your build.gradle file. To solve this, you need to remove the following line of code:
compile 'com.firebase:firebase-client-android:2.3.1'
You cannot mix the old version of dependency with the new one.
Make sure to update firebase version to latest available version in your build(app) configuration exactly mentioned in the firebase documentation.
[https://firebase.google.com/docs/android/setup/]
If you are using play services make sure that the version of firebase library should be exactly same as of play services version.
compile 'com.google.android.gms:play-services:11.2.0'
compile 'com.google.firebase:firebase-core:11.2.0'
compile 'com.google.firebase:firebase-messaging:11.2.0'
If there is a library conflict then add gradle as:
defaultConfig {
multiDexEnabled true
}
and in your baseapplication
#Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
I have used the code like below code. I am getting this exception. I checked the several links according to that links I have done my code. but still get issue
Please advice me to overcome from this issue
Error:Execution failed for task ':app:processDebugGoogleServices'.
Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 10.2.6.
My gradle like this
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'
})
final RETROFIT = '2.3.0'
final SUPPORT_LIBRARY_VERSION = '25.3.1'
final FIREBASE_VERSION = '10.0.1'
final PLAY_SERVICE = '10.2.6'
//support
compile "com.android.support:appcompat-v7:$SUPPORT_LIBRARY_VERSION"
compile "com.android.support:design:$SUPPORT_LIBRARY_VERSION"
compile "com.android.support:support-v4:$SUPPORT_LIBRARY_VERSION"
compile "com.android.support:cardview-v7:$SUPPORT_LIBRARY_VERSION"
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
//api inspection
compile 'com.facebook.stetho:stetho:1.4.2'
compile 'com.facebook.stetho:stetho-okhttp3:1.4.2'
//api
compile "com.squareup.retrofit2:retrofit:$RETROFIT"
compile "com.squareup.retrofit2:converter-gson:$RETROFIT"
compile 'com.google.code.gson:gson:2.7'
//play
compile "com.google.android.gms:play-services-location:$PLAY_SERVICE"
compile "com.google.android.gms:play-services-analytics:$PLAY_SERVICE"
//push
compile "com.google.firebase:firebase-core:$FIREBASE_VERSION"
//mutlidex
compile 'com.android.support:multidex:1.0.0'
//image
compile 'com.github.bumptech.glide:glide:3.7.0'
//log
compile 'com.jakewharton.timber:timber:4.5.1'
//scan
compile 'com.google.zxing:core:3.0.1'
//others
compile 'me.relex:circleindicator:1.2.2'
}
apply plugin: 'com.google.gms.google-services'
You are using different version of the same libraries.
final FIREBASE_VERSION = '10.0.1'
final PLAY_SERVICE = '10.2.6
Keep in mind that Firebase has a dependency with google play services libraries.
I have updated compileSdkVersion from 23 to 24. After, it gave me an error for com.google.android.gms. When I checked the library, there is only one com.google.android.gms is in the version of 8.3.0 (measurement).
I couldn't force to update measurement as
compile 'com.google.android.gms:play-services-measurement:9.4.0'
It is giving the following error;
Failed to resolve:
com.google.android.gms:play-services-measurement:9.4.0
I have examined other stackoverflow questions but they couldnt solve my problem.
How can I solve this error?
Here are my dependencies;
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile('com.google.api-client:google-api-client-android:1.20.0') {
exclude group: 'org.apache.httpcomponents'
}
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.google.android.gms:play-services-gcm:9.4.0'
compile 'com.google.android.gms:play-services-analytics:9.4.0'
compile 'com.google.android.gms:play-services-maps:9.4.0'
compile 'com.google.android.gms:play-services-location:9.4.0'
compile 'com.github.npanigrahy:Custom-Calendar-View:v1.0'
compile 'com.android.support:support-v4:24.2.0'
compile 'com.wonderpush:wonderpush-android-sdk:1.2.3.2'
compile 'com.android.support:design:24.2.0'
compile 'org.mod4j.org.apache.commons:lang:2.1.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5#aar') {
transitive = true;
}
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile project(':circleimageview-release')
}
full error text:
Error:Execution failed for task ':app:processDebugGoogleServices'.
Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is
available at
https://bintray.com/android/android-tools/com.google.gms.google-services/)
or updating the version of com.google.android.gms to 8.3.0.
I have find the solution of my problem. I have updated my project level of my gradle as from
classpath 'com.google.gms:google-services:1.5.0-beta2'
to
classpath 'com.google.gms:google-services:3.0.0'
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
I got the jar file and also pasted it in lib folder of my project. Got the API key , and also wrote compiling code but still cannot import com.google.android.youtube
dependencies {
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile files('libs/YouTubeAndroidPlayerApi.jar')
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 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-vision:10.0.1'
compile 'com.google.android.gms:play-services-maps:10.0.1'
compile 'com.google.android.gms:play-services-location:10.0.1'
compile 'com.google.android.gms:play-services-places:10.0.1'
compile 'com.google.apis:google-api-services-youtube:v3-rev157-1.21.0'
}
The dependency: compile files('libs/YouTubeAndroidPlayerApi.jar') have two occurrences in your gradle file. Also edit the dependency: compile 'com.google.apis:google-api-services-youtube:v3-rev157-1.21.0' to compile 'com.google.apis:google-api-services-youtube:v3-rev181-1.22.0'. You can find more information here. After updating the gradle file, build your project once again.
I found here an issue about Android Player API of YouTube. The issue is all about YouTube APIs should have support via gradle and a documentation of it. I found here in this issue that one of the community created a github on how to add YouTube Android Player API into Android application via Gradle. So you may look on this on how to use it.
For more information, check this related SO question.