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'
Related
I am trying to add Kommunicate services to my Android app.
But when I add the dependencies of kommunicate, I get an error stating that it crashes with the google-services-auth implementation
The dependencies section is as follows:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
implementation 'androidx.recyclerview:recyclerview:1.0.0-alpha1'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.android.material:material:1.1.0-alpha02'
implementation 'com.google.apis:google-api-services-blogger:v3-rev61-1.25.0'
implementation 'com.github.bumptech.glide:glide:4.8.0'
implementation 'io.kommunicate:kommunicate:1.6.3'
implementation 'com.github.GrenderG:Toasty:1.3.1'
implementation 'com.rom4ek:arcnavigationview:1.0.3'
implementation 'com.github.Commit451:ModalBottomSheetDialogFragment:1.1.0'
implementation 'com.android.volley:volley:1.1.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
The full log is as follows:
In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[15.0.1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.android.gms:play-services-stats:15.0.1 -> com.google.android.gms:play-services-basement#[15.0.1], but play-services-basement version was 16.0.1.
The following dependencies are project dependencies that are direct or have
transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto io.kommunicate:kommunicate#1.6.3
-- Project 'app' depends onto com.google.android.gms:play-services-auth#16.0.1
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your build.gradle file.
So silly of me!
The play-services-auth is version 15.0.1:
implementation 'com.google.android.gms:play-services-auth:15.0.1'
But not 16.0.1:
implementation 'com.google.android.gms:play-services-auth:16.0.1'
i tried all possible methods and it still did not sync please help. Below is my whole gradle file, i have tried to merge the firebase core and messaging but it still shows the error
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-database:16.0.4'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
implementation 'com.google.firebase:firebase-storage:16.0.4'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.firebaseui:firebase-ui-database:1.1.1'
implementation 'id.zelory:compressor:2.1.0'
implementation 'com.squareup.okhttp:okhttp:2.5.0'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.github.arturogutierrez:badges:1.0.5#aar'
implementation 'com.github.broakenmedia:CharCountTextView:v1.0'
implementation 'com.github.broakenmedia:MultiContactPicker:1.8.3'
implementation 'com.github.lguipeng:BubbleView:1.0.1'
implementation 'com.rockerhieu.emojicon:library:1.3.3'
implementation 'com.android.support:cardview-v7:27.1.1'
}
apply plugin: 'com.google.gms.google-services'
Below is the error message
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.4.
In your project build.gradle file, replace with below line:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
compile 'com.google.gms:google-services:4.2.0'//the latest version is 4.2.0
}
}
You are using different versions of firebase dependencies. That may be the reason for the failure. Update the google-services to latest version and use same version for firebase dependencies..
// as you can see different versions for firebase dependecies
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-database:16.0.4'
Either use 16.0.4 or the latest version of firebase dependencies.
This is my build.gradle(app)
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.0'
implementation 'com.android.support:design:27.1.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-auth:10.2.0'
compile 'com.google.android.gms:play-services-auth:15.0.0'
compile 'com.firebaseui:firebase-ui-auth:2.3.0'
compile 'com.google.firebase:firebase-database:10.2.0'
compile 'com.firebaseui:firebase-ui:1.2.0'
compile 'com.firebaseui:firebase-ui-database:1.2.0'
compile 'com.firebaseui:firebase-ui-storage:1.2.0'
}
These are my dependencies in build.gradle(project):
{
classpath 'com.android.tools.build:gradle:3.1.1'
classpath 'com.google.gms:google-services:3.2.1'
}
Can anyone please help with what I am doing wrong here?
Check google services version and it is not compatible with the gradle version.
{
classpath 'com.android.tools.build:gradle:3.1.1'
classpath 'com.google.gms:google-services:3.2.1'
}
Try to downgrade or upgrade google services version.
Missing some of your gradle and log information I give it a try, but I might be wrong:
Build (Project level) (3.2.1 doesn't exists, it is 3.1.2)
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1'
classpath 'com.google.gms:google-services:3.1.2'
}
Build (app level)
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:design:27.1.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'
implementation 'com.google.firebase:firebase-auth:15.0.0'
implementation 'com.google.android.gms:play-services-auth:15.0.0'
implementation 'com.firebaseui:firebase-ui-auth:2.3.0'
implementation 'com.google.firebase:firebase-database:15.0.0'
implementation 'com.firebaseui:firebase-ui:1.2.0'
implementation 'com.firebaseui:firebase-ui-database:1.2.0'
implementation 'com.firebaseui:firebase-ui-storage:1.2.0'
(appcompat downgraded, firebase upgraded, compile replaced by implementation), I had similar problem with appcompat and downgrading to 27.0.2 solved for me
You can't use firebase-ui 1.2.0.
Check the compatibility here:
compile 'com.firebaseui:firebase-ui-database:3.3.1'
compile 'com.firebaseui:firebase-ui-storage:3.3.1'
implementation 'com.firebaseui:firebase-ui-database:3.3.1'
compile 'com.firebaseui:firebase-ui-auth:3.3.1'
Then use the same version of Google play services libraries and firebase libraries:
compile 'com.google.firebase:firebase-auth:15.0.0'
compile 'com.google.android.gms:play-services-auth:15.0.0'
compile 'com.google.firebase:firebase-database:15.0.0'
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.
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'