Hi, I am getting this error during build:
Multiple dex files define Lcom/google/android/gms/internal/zzbf
Here is the list of dependencies in my app/build.gradle:
dependencies {
compile project(':react-native-onesignal')
compile project(':react-native-restart')
compile project(':react-native-fast-image')
compile project(':react-native-fbads')
compile project(':react-native-fbsdk')
compile project(':react-native-code-push')
compile project(':react-native-vector-icons')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
}
I have also gone through all dex related tickets, but no luck so far. Any idea what is causing the conflict problem? Thank you.
Cheers
@mortezaalizadeh The error means there are multiple copies of different versions of the Google Play services in your project. Check for com.google.android.gms in the depend project you have in that list.
You can also run ./gradlew dependencies your projects Android folder in a terminal to get you a full list of dependencies to help find the version mismatch.
Thanks @jkasten2 , I forgot to update the ticket last night, the issue was due to the conflict with react-native-fbads that uses gms: V8.4.1.
Hello, I have such a problem. How could I fix it?
I have similar problem, for fixing it i modified "./platforms/android/build.gradle" file by editing it in VIM editor. But once i am building my app fro android all my changes in "./platforms/android/build.gradle" file are reverted back. And i got the same error. How to fix this ?
https://stackoverflow.com/questions/49585333/build-gradle-restore-to-old-config-after-ionic-cordova-build
Do you still make a mistake?
2 Nis 2018 22:06 tarihinde Abhiteshkr notifications@github.com yazdı:
I have similar problem, for fixing it i modified "./platforms/android/build.gradle" file by editing it in VIM editor. But once i am building my app fro android all my changes in "./platforms/android/build.gradle" file are reverted back. And i got the same error. How to fix this ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/geektimecoil/react-native-onesignal/issues/297#issuecomment-378013080, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AhvyDCqs6WADvTBQY0QC6Pe4tKsh8eN-ks5tknamgaJpZM4OuowO.
Firebase Android SDKs now have independent version numbers, allowing
for more frequent, flexible updates.
Update all your Firebase dependencies to the latest version (as of 2 May 2018):
Firebase Core com.google.firebase:firebase-core:15.0.2
Ads com.google.firebase:firebase-ads:15.0.0
Analytics com.google.firebase:firebase-analytics:15.0.2
App Indexing com.google.firebase:firebase-appindexing:15.0.0
Authentication com.google.firebase:firebase-auth:15.1.0
Cloud Firestore com.google.firebase:firebase-firestore:16.0.0
Cloud Functions com.google.firebase:firebase-functions:15.0.0
Cloud Messaging com.google.firebase:firebase-messaging:15.0.2
Cloud Storage com.google.firebase:firebase-storage:15.0.2
Crash Reporting com.google.firebase:firebase-crash:15.0.2
Crashlytics com.crashlytics.sdk.android:crashlytics:2.9.1
Invites com.google.firebase:firebase-invites:15.0.2
Performance Monitoring com.google.firebase:firebase-perf:15.1.0
Realtime Database com.google.firebase:firebase-database:15.0.0
Remote Config com.google.firebase:firebase-config:15.0.2
Release note: https://firebase.google.com/support/release-notes/android
This article might be helpful too if you're pulling out your hair (like I did).
@mortezaalizadeh The error means there are multiple copies of different versions of the Google Play services in your project. Check for com.google.android.gms in the depend project you have in that list.
You can also run ./gradlew dependencies your projects Android folder in a terminal to get you a full list of dependencies to help find the version mismatch.
./gradlew app:dependencies worked for me
Most helpful comment
Update all your Firebase dependencies to the latest version (as of 2 May 2018):
Release note: https://firebase.google.com/support/release-notes/android