question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UI incompatibility with other Firebase libs is not warned in documentation

See original GitHub issue

Greetings

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:closed
  • Created 7 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
samtsterncommented, Jul 19, 2016

Added a section to README.md detailing this compatibility issue. Please feel free to submit a PR if it’s unclear or insufficient.

0reactions
edicas666commented, Sep 19, 2016

Thank you, man, i was searching how to solve this error all day, thank you again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Release Notes | Firebase - Google
This release includes changes to Cloud Firestore and other changes. ... Emulator UI imports to Realtime Database no longer trigger Cloud Functions
Read more >
Known issues with Android Studio and Android Gradle Plugin
This page tracks known issues with Android Studio Dolphin | 2021.3.1 and Android Gradle plugin 7.3.1. If you experience an issue not already...
Read more >
Using Firebase - Expo Documentation
The following sub-sections use firebase@9.x.x . Expo SDK do not enforce or recommend any specific version of Firebase to use in your app....
Read more >
Gradle Error:Execution failed for task - android - Stack Overflow
0 There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is...
Read more >
Release Notes - Play services - Google Developers
The latest update to Firebase includes changes to: Firebase Android BoM (Bill of Materials); Cloud Firestore; Firebase App Distribution Gradle plugin; Firebase ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found