Excecution failed for task ':app:proccessDebugGoogleServices' - android

I am trying to connect my app with firebase analytics.
I have problem when Gradle tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar].
I have already put implement 'com.google.firebase:firebase-core:11.6.0' in build.gradle as following guide.
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-core:11.6.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.google.android.gms:play-services-ads:11.4.2'
}
apply plugin: 'com.google.gms.google-services'
gradle build finished with 1 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.6.0.
Is anyone able to help me? Thank you in advance.

To solve this, this you need to add this line of code:
classpath 'com.google.gms:google-services:3.1.1'
In your dependencies from your build.gradle (Project) file.
Change also this line of code:
implementation 'com.google.android.gms:play-services-ads:11.4.2'
with
implementation 'com.google.android.gms:play-services-ads:11.6.0'

You have to use the same version of firebase libraries and google play service libraries:
implementation 'com.google.firebase:firebase-core:11.6.0'
implementation 'com.google.android.gms:play-services-ads:11.6.0'

Related

LocationAwareException: Execution failed for task ':app:processDebugManifest'

I have updated my gradle to latest version and now I am having this error.
org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':app:processDebugManifest'.
I have seen other questions about this, but it didn't help. I have tried removing all the dependencies but the same error is shown, so it is not a compatibility issue?
My gradle file
Here's the full error: link
I am not sure which version API you are using.
Solution 1: File => Invalidate Caches / Restart
Solution 2: Check the AndroidManifest.xml and build.gradle using same targetSdkVersion, minimum and maximum sdk version.
solution 3: Check dependencies in build.gradle file. Then comment out one by one and sync. For an example:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:28.0.0'
testImplementation 'junit:junit:4.12'
//androidTestImplementation 'com.android.support.test:runner:1.0.2'
//androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

Please fix the version conflict either by updating the version of the google-services plugin (Firebase and Google Maps)

I know this question has been asked several times, but I can't seem to find to a work around it. I've updated all the implementations to the latest version but I still get the error 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 16.0.3.
I'm building an app that uses firebase and maps. The project builds okay at first (without connecting to firebase) but when I do connect and add the google-services plugin, I get the error above
apply plugin: 'com.google.gms.google-services'
This is my build.gradle (Module: app) file
....
dependencies
{
implementation fileTree(dir: 'libs', include: ['*.jar'])
// Android Support
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-media-compat:27.1.1'
implementation 'com.android.support:mediarouter-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:27.1.1'
// Android TestImplementation
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
// Firebase Authentication
implementation 'com.google.firebase:firebase-auth:16.0.3'
implementation 'com.google.firebase:firebase-core:16.0.3'
// Google Play Services
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-places:15.0.1'
// Google Sign In SDK
implementation 'com.google.android.gms:play-services-auth:16.0.0'
}
apply plugin: 'com.google.gms.google-services'
Can someone kindly explain to me where I'm going wrong

Fixing version conflicts in Android studio

So I connected my app to Firebase, and they gave me this:
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 16.0.0.
Although this may sound weird, but i don't fully understand what they mean. This is my gradle code:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
compile 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-database:16.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'
Can someone please explain to me what the error message means and what I can do? How do i update this google.android.gms?
Help will be appreciated :-)
You should use the same version like, if firebasecore is 16.0.0
all other firebase should be the same 16.0.0
please correct this..in your app gradle :
{ compile 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-database:16.0.1'}
use it like this....
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-database:16.0.0'
Let me know it this work for u...
u should use same version otherwise it will conflict with other same support lib

Error: Please fix the version conflict

While using the dependencies shows error on either auth or on database.how to resolve this???
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
//here it shows error 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.
implementation 'com.google.firebase:firebase-database:11.0.4'
implementation 'com.google.firebase:firebase-auth:11.0.4'
implementation 'com.basgeekball:awesome-validation:4.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'com.google.firebase:firebase-core:11.8.0'
}
apply plugin: 'com.google.gms.google-services'
Change the following:
implementation 'com.google.firebase:firebase-database:11.0.4'
implementation 'com.google.firebase:firebase-auth:11.0.4'
to this:
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
all firebase dependencies need to be the same version
Obviously, you can use firebaseAuth and firebase Realtime database at the same time. But your gradle dependencies for firebase should be of same version.

Version conflict between google-services and android-gms

I have module gradle dependencies like this
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:+'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-core:11.6.2'
implementation 'com.google.firebase:firebase-messaging:11.6.2'
implementation 'com.google.android.gms:play-services-gcm:11.6.2'
implementation 'com.google.android.gms:play-services-ads:11.6.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
and project gradle like this
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.1.2'
}
when i am syncing my project with gradle i am getting execution failed error
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.4.2.
But why? I have target SDK of 27, i am everywhere where i can already set to use latest packages, why studio asks me to downgrade com.google.android.gms to 11.4.2 ?
SDK Tools are
As mentioned by the OP, the line
apply plugin: 'com.google.gms.google-services'
must be moved to the bottom of the app module build gradle file. This line should come after all google gms dependencies.
Instead of
implementation 'com.android.support:appcompat-v7:+'
...
implementation 'com.google.firebase:firebase-core:11.6.2'
implementation 'com.google.firebase:firebase-messaging:11.6.2'
implementation 'com.google.android.gms:play-services-gcm:11.6.2'
implementation 'com.google.android.gms:play-services-ads:11.6.2'
use
implementation 'com.android.support:appcompat-v7:27.0.2'
...
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
implementation 'com.google.android.gms:play-services-gcm:11.8.0'
implementation 'com.google.android.gms:play-services-ads:11.8.0'

Categories

Resources