Closed ChaoTzuJung closed 6 years ago
Change this line:
implementation "com.google.android.gms:play-services-auth:9.2.1
To:
implementation "com.google.android.gms:play-services-auth:15.0.0"
had the same error. That resolved it
Please follow @jaschaio suggestion, if problems persist feel free to reopen the issue thank you @jaschaio
Is this behavior documented somewhere? I'm somewhat busy right now, but will be back and try to update the documentation to include this instructions when using the library with Gradle 4.4
I am facing same issue:
Even though I am using implementation "com.google.android.gms:play-services-auth:15.0.0"
This is the android/app/build.gradle, I am using.
dependencies {
compile project(':react-native-fs')
compile project(':react-native-image-resizer')
compile project(':react-native-image-picker')
compile project(':react-native-fetch-blob')
compile project(':react-native-fcm')
compile 'com.google.firebase:firebase-core:10.0.1' //this decides your firebase SDK version
compile 'com.google.firebase:firebase-messaging:10.0.1'
compile project(':react-native-vector-icons')
compile project(':react-native-fcm')
compile project(':react-native-webview-bridge')
compile project(':react-native-svg')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:23.0.1"
implementation "com.facebook.react:react-native:+"
implementation(project(":react-native-google-signin")){
exclude group: "com.google.android.gms" // very important
}
implementation "com.google.android.gms:play-services-auth:15.0.0" // should be at least 15.0.0 to work with most recent APIS
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply plugin: 'com.google.gms.google-services'
I don't know about react but in ionic I fix this issue doing: 1 - go to file platforms/android/app/build.gradle and change the line
compile "com.google.android.gms:play-services-location:15.+"
to:
compile "com.google.android.gms:play-services-location:11.0.1"
2 - file platform/android/project.properties and change the line:
cordova.system.library.1=com.google.android.gms:play-services-location:15.+
to:
cordova.system.library.1=com.google.android.gms:play-services-location:11.0.1
If anyone is still struggling with this. I found an issue that isn't mentioned here that caused this error message. Here is what I found:
implementation 'com.google.android.gms:play-services-gcm:15.0.1'
implementation 'com.google.android.gms:play-services-analytics:16.0.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
For some reason implementation 'com.google.android.gms:play-services-analytics:16.0.1'
is 16.0.1 - This is a typo, and if you correct it to 15.0.1
it will prevent the error.
apply plugin: 'io.fabric' apply plugin: 'com.google.firebase.firebase-perf'
android { compileSdkVersion 26 buildToolsVersion '28.0.3' defaultConfig { applicationId "com.bodaty.deyaPay.deyaPay9" minSdkVersion 19 targetSdkVersion 26 versionCode 15 versionName "2.4" multiDexEnabled true testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } }
dependencies { implementation 'com.google.firebase:firebase-crash:11.4.2' implementation fileTree(include: ['*.jar'], dir: 'libs') androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) implementation 'com.google.firebase:firebase-perf:11.4.2' implementation 'com.squareup.okhttp3:okhttp:3.10.0' implementation 'com.google.code.gson:gson:2.8.2' implementation 'com.squareup.retrofit2:retrofit:2.3.0' implementation 'com.squareup.retrofit2:converter-gson:2.3.0' implementation 'com.google.firebase:firebase-messaging:11.4.2' implementation 'com.google.firebase:firebase-messaging:11.4.2' implementation 'com.android.support:appcompat-v7:26.+' implementation 'com.android.support.constraint:constraint-layout:1.0.2' implementation 'com.google.firebase:firebase-core:11.4.2' implementation 'com.google.firebase:firebase-database:11.4.2' implementation 'com.google.firebase:firebase-firestore:11.4.2' implementation 'com.google.firebase:firebase-auth:11.4.2' implementation 'com.android.support:design:26.+' implementation 'com.android.support:cardview-v7:26.1.0' implementation 'com.android.support:support-vector-drawable:26.+' implementation 'com.googlecode.libphonenumber:libphonenumber:8.7.0' implementation 'com.android.support:support-v4:26.+' implementation 'com.stripe:stripe-android:5.1.0' implementation 'de.hdodenhof:circleimageview:2.2.0' implementation 'com.google.android.gms:play-services-wallet:11.4.2' implementation 'com.crashlytics.sdk.android:crashlytics:2.9.6' implementation 'com.android.support:recyclerview-v7:26.0.0' testImplementation 'junit:junit:4.12' implementation 'com.stripe:stripe-android-issuing-push-provisioning:1.0.3' implementation 'com.google.android.gms:play-services-tapandpay:17.0.1' } apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.android.gms.strict-version-matcher-plugin' `
I just follow the android guide but i got the error !
I find any method to solve my problem but it still no work And the document ask me to replace
instead of
But my version is
So if I change version to 2.14, it will crash
Do anybody know how to fix it ?
This is my app/build.gradle