UI incompatibility with other Firebase libs is not warned in documentation
See original GitHub issueGreetings
Im creating a project from scratch. Initially I want to use auth-ui, storage and database. This were my compile dependencies:
compile 'com.firebaseui:firebase-ui-auth:0.4.2'
compile 'com.google.firebase:firebase-database:9.0.0'
compile 'com.google.firebase:firebase-storage:9.0.0'
Add that time I was using the dependencies as listed in this getting started guide
1.- But when I try to run the app I got what it seems to be a multi dex problem:
Error:Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzadx;
:app:transformClassesWithDexForDebug FAILED
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2
2.- So the multidex problem should have being fix by following this guide, but the problem is now this:
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzafc.class
3.- After some hours of head scratching, Google searching and reading StackOverflow, I thought “Well, firebase ui is related with the database firebase ui”. So I removed firebase database, and it worked
4.- Then, I try to remove the multidex to narrow down the problem, the app also run. The problem is, I have no database. The following was my compile dependencies at that time:
compile 'com.firebaseui:firebase-ui-auth:0.4.2'
compile 'com.google.firebase:firebase-storage:9.0.0'
5.- Since it was not a multidex problem, and the problem solved by removing the firebase database, then is a conflict issue. Some more googling and I stumble into this Google group answer. So Im guessing “Since I used the getting started dependencies maybe in the individual documentation for every dependency there is the updated version”. In the storage documentation the version is the same as listed in the getting started documentation, but in the database documentation the version is newer. So I updated only the database version. This are the dependencies changed:
compile 'com.firebaseui:firebase-ui-auth:0.4.2'
compile 'com.google.firebase:firebase-database:9.2.1'
compile 'com.google.firebase:firebase-storage:9.0.0'
But I got back to square one with the same initial error:
Error:Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzajj;
:app:transformClassesWithDexForDebug FAILED
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2
6.- So, since I updated the database, maybe I should update also the storage, like this:
compile 'com.firebaseui:firebase-ui-auth:0.4.2'
compile 'com.google.firebase:firebase-database:9.2.1'
compile 'com.google.firebase:firebase-storage:9.2.1'
Finally working.
Then I made my mind about using database-ui (single target), but I had the same problem using storage version 9.0.0, then change it to 9.2.1 and its solved.
I dont want to impose here, but the problem seem to be this: The getting started documentation has older versions of listed dependencies, some of the specific documentation haven’t update the version (storage), couldn’t find any warning about conflicts with other dependencies.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
Added a section to README.md detailing this compatibility issue. Please feel free to submit a PR if it’s unclear or insufficient.
Thank you, man, i was searching how to solve this error all day, thank you again.