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.
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "in.lmcgroup.lmcgroup"
minSdkVersion 16
targetSdkVersion 27
multiDexEnabled true
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
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.3.1'
testCompile 'junit:junit:4.12'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.3.1'
compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.google.firebase:firebase-auth:11.8.0'
compile 'com.google.firebase:firebase-database:11.8.0'
compile 'com.google.firebase:firebase-admin:5.7.0'
compile 'com.firebaseui:firebase-ui-auth:3.1.0'
compile 'com.android.support:support-v4:26.+'
}
apply plugin: 'com.google.gms.google-services'
Did you add classpath in your app gradle?
classpath 'com.google.gms:google-services:3.0.0'
Related
I was trying to solve this gradle error.I imported this project by getting it from a friend of mine.It worked in his system perfectly. Seems like I have a The following issues in my gradle.
Error:Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (27.0.2) and test app (25.4.0) differ.
The following are my gradle
Module app
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "27.0.2"
defaultConfig {
applicationId "com.startup.hospital"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:27.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:27.+'
compile 'com.android.support:support-vector-drawable:27.0.2'
compile 'com.android.support:support-v4:27.0.2'
compile 'com.aurelhubert:ahbottomnavigation:2.1.0'
compile 'com.github.arimorty:floatingsearchview:2.1.1'
compile 'com.ss.bottomnavigation:bottomnavigation:1.5.2'
compile 'jp.wasabeef:glide-transformations:2.0.2'
compile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1'
}
Project gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "27.0.1"
defaultConfig {
applicationId "com.startup.hospital"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:27.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:27.+'
compile 'com.android.support:support-vector-drawable:27.0.2'
compile 'com.android.support:support-v4:27.0.2'
compile 'com.aurelhubert:ahbottomnavigation:2.1.0'
compile 'com.github.arimorty:floatingsearchview:2.1.1'
compile 'com.ss.bottomnavigation:bottomnavigation:1.5.2'
compile 'jp.wasabeef:glide-transformations:2.0.2'
compile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1'
}
Just add the following in your build.gradle (:app)
configurations.all {
resolutionStrategy {
force 'com.android.support:appcompat-v7:26.+'
force 'com.android.support:support-compat:26.+'
force 'com.android.support:support-core-ui:26.+'
force 'com.android.support:support-annotations:26.+'
force 'com.android.support:recyclerview-v7:26.+'
}
}
Your espresso has already those dependencies same as you have declared above for support library with different version which is causing problem so exclude theme like below from module build.gradle file
androidTestCompile('com.android.support.test.espresso:espresso-core:3.0.1', {
exclude group: 'com.android.support', module: 'support-annotations'
})
here is what it should look like
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "27.0.2"
defaultConfig {
applicationId "com.startup.hospital"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:27.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:27.+'
compile 'com.android.support:support-vector-drawable:27.0.2'
compile 'com.android.support:support-v4:27.0.2'
compile 'com.aurelhubert:ahbottomnavigation:2.1.0'
compile 'com.github.arimorty:floatingsearchview:2.1.1'
compile 'com.ss.bottomnavigation:bottomnavigation:1.5.2'
compile 'jp.wasabeef:glide-transformations:2.0.2'
compile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:1.0.1'
androidTestCompile('com.android.support.test.espresso:espresso-core:3.0.1', {
exclude group: 'com.android.support', module: 'support-annotations'
})
and Your project level build.gradle file should not have those dependencies declared again.
just added this
configurations.all {
resolutionStrategy.force 'com.android.support:support-annotations:22.1.0'
}
My build.gradle(Module:app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "co.balraj.thawedarshan.thawedarshan"
minSdkVersion 15
targetSdkVersion 18
versionCode 2
versionName "1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled = true
manifestPlaceholders = [manifestApplicationId: "${applicationId}",
onesignal_app_id: "7a55b2de-e55d-4c10-8381-7ec71c0edddb",
onesignal_google_project_number: "347030018851"]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
//CardView
//Universal Image Loaader
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:design:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:recyclerview-v7:26.+'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:cardview-v7:26.+'
compile 'com.android.support:support-vector-drawable:26.+'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.android.support:support-v4:26.+'
compile 'com.google.android.gms:play-services-ads:11.+'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.google.android.gms:play-services:+'
compile 'com.google.android.gms:play-services-identity:11.+'
compile 'com.google.android.gms:play-services-gcm:11+'
compile 'com.google.android.gms:play-services-analytics:11.+'
compile 'com.google.android.gms:play-services-location:11.+'
compile 'com.onesignal:OneSignal:2.+#aar'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Error
Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]
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.+.
compile your code with
dependencies {
compile 'com.google.android.gms:play-services:+'
}
and remove
compile 'com.google.android.gms:play-services-identity:11.+'
compile 'com.google.android.gms:play-services-gcm:11+'
compile 'com.google.android.gms:play-services-analytics:11.+'
compile 'com.google.android.gms:play-services-location:11.+'
apply plugin: 'com.google.gms.google-services'
It should work
Check if you have placed this in your gradle:
repositories {
jcenter()
maven {
maven { url "https://maven.google.com" }
}
}
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.0.1.
My gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "APP_ID"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
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.2.0'
compile 'com.android.support:design:25.2.0'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.android.gms:play-services-auth:10.2.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
I don't understand why it is happening. I only know because using minSDK below 14 from this page, but mine is 16.
Maybe your firebase and Google Play Services dependency versions should match? Right now they're at 10.0.1 and 10.2.0
I am trying to add the firebase admin SDK to my project following the instructions here: https://firebase.google.com/docs/admin/setup
but when i add compile 'com.google.firebase:firebase-admin:4.0.4' on my build.grandle file, then following error appears:
Error:(44, 0) Version: 4.0.4 is lower than the minimum version (9.0.0) required for google-services plugin.
If i try version 4.0.3 i face the same problem.
My build.grandle file at the moment:
android {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
compileSdkVersion 25
buildToolsVersion "25.0.1"
defaultConfig {
applicationId "com.example.qrcodereader"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// compile 'com.google.android.gms:play-services-appindexing:9.0.0'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.google.zxing:core:3.2.1'
compile 'com.google.firebase:firebase-admin:4.0.4'
compile 'com.journeyapps:zxing-android-embedded:3.2.0#aar'
compile 'com.android.support:gridlayout-v7:25.1.0'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.firebaseui:firebase-ui:1.1.0'
compile 'com.android.support:support-v4:25.1.0'
compile project(':linkedin-sdk')
testCompile 'junit:junit:4.12'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
}
apply plugin: 'com.google.gms.google-services'
Any help appreciated :)
i am trying to declare Firebase but it's giving error can not resolve Firebase.
i have added all the dependencies. when typing in android studio FirebaseDatabase etc are available but simple Firebase is not.
here are my dependencies
enter code here
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.doctor.lenovo.mvprecovery"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
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.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.firebase:firebase-storage:10.0.1'
compile 'com.google.firebase:firebase-crash:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Make sure you have the lastest version of Google Repository (You can update to a newer version in SDK Manager tab)