-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to find byte code for com/google/firebase [any unused module] #915
Comments
@iljadaderko any chance you could try the latest code from master and see whether its fixed? Just did some changes to migrate to the new Gradle dependency configurations: 7f7169b Alternatively, try making the equivalent changes locally to see if it fixes the issue... |
@chrisbianca will give it a shot as soon as I am done with my main work. Could be related to compile being deprecated. When we include firebase modules in our own projects, I assume we should use |
Great, thanks. Yeah, I've switched our tests app over to using |
There was one other guy in Stack Overflow question I mentioned having same issues with 3.3 after upgrading to latest gradle by the way. |
@chrisbianca ok, so I basically swapped I'm not sure if this is already fixed in v4 but now this is popping up
I'm not using adMob module in project, so not sure if its still related to this issue. Let me know if I should close and open another one. I will run v4 this weekend to see if it fixes these issues, as there are few things I need to change according to the docs to make it work. |
Awesome, thanks for the confirmation! Yes, that is fixed in v4 - it's a result of some API changes in v12 of the Firebase Android libs |
As a side note, my project has all changes you made to test app as well, so if yours is working on v4, I think mine will as well 👍 |
We're going to get another RC of v4 out shortly - once we have, we'll close this issue off. We're unlikely to backport this to v3 due to the complications with getting it working across multiple gradle versions. |
v4.0.0-rc.3 is out now. Check out the release notes for instructions on how to upgrade gradle: https://github.com/invertase/react-native-firebase/releases/tag/v4.0.0-rc.3 |
@chrisbianca I updated my project to v4.0.0-rc.3 just now, started getting these errors again.
And am still getting the error I went and compared build.gradle from rc3 that I have in android studio with changes you referenced 7f7169b, everything is identical. My next step was to compare my android setup with your test app setup and there is one difference, but nothing I can see that would cause this, I have My dependencies are
I am currently getting errors related to database / adMob etc.. all modules I don't use
|
And as expected it all worked once I added (not propper solution however, correct?)
|
@iljadaderko It looks like this is a known issue in 3.1 :( https://issuetracker.google.com/issues/72811718 If you disable instant run this should start working for you again. |
Gotcha, thank you for bug reference, shame they released with this :/ |
Isn't it just! Pretty poor tbh, essentially breaking any library that's correctly specifying We'll make sure we include it in the upgrade / migration notes. I think if you run from the command line, this won't be an issue, it's only if you go through Android Studio. |
Yeh, it seems its related to their "Instant Run" functionality, that can be disabled. Will make rebuilding apps a bit slower however, might be a good alternative instead of including all missing libs for some people. |
Same issue here. Any fixes for this? |
@sequencer08 3 options
|
Hi @iljadaderko, Thanks for the suggestion. I able to fixed the issue by including all the firebase modules since I already upgraded the gradle to 3.1.1. But is there any option except including all firebase modules? For me, I think It's not necessary to include what I'm not using. Big thanks 😄 |
@sequencer08 honestly I'd just disable instant run in android studio, its not needed for react native projects imho. Googling how to do so should solve your issue 👍 Its android studio specific, when you build with cli you won't see the issue. |
Disabling instant run fixed this |
Failed to find byte code for com/google/firebase/database/DatabaseReference$CompletionListener disabling instant run fixed it for for me too (android studio 3.2.1) |
same bugs :( help |
Issue
I upgraded to android studio 3.1 today and gradle 3.1 that came out and started getting these errors
etc... all of these are firebase modules I currently don't use in my project i.e I don't have anything like
compile 'com.google.firebase:firebase-database:11.8.0'
in my
app/build.gradle
as I don't use it. I also submitted a question at stack overflow regarding this: https://stackoverflow.com/questions/49518556/failed-to-find-byte-code-for-com-google-firebaseWhere they suggested to actually include any erorring modules and this does indeed fix the issue, but I had to add a ton of them, which I don't think is necessary?
Fact that this happens to almost all firebase dependencies that I don't use and can only assume are used in RNFirebase I think this is an issue?
Environment
The text was updated successfully, but these errors were encountered: