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
com.android.build.api.transform.TransformException: Error while generating the main dex list #2857
Comments
Difficult to say. You included the info but all I can see is an ext block specifying play services 15 and down below you've got 16. I wonder if that's it? In general - this is going to be unpopular - but with older versions of all the dependencies I am a lot less sure of where things are going wrong. The unpopularity is because I know how difficult the react-native 0.59/0.60 transition was. 0.61 was easy but getting to 0.60 was really hard. I would definitely start planning that transition though - all of this stuff is known working with current versions Without being on at least 0.59.3 though I don't think you can even use the up to date SDKs on the iOS side which means iOS13 will be pretty buggy. That's a tangent for your issue - I know it's android - but can maybe help make the case to start upgrading. |
thanks for the feedback! an upgrade is on the table, but in the next months, not right now, due to the high costs and time. changing to: I have added here the 5000 lines that is output for Do you notice something here? |
the thing is - they still aren't lining up. 16.0.0 != 16.1.0, and you can see below that's what you specify. You should probably be referencing the gradle variable in the second one to make sure they are exact. As a second suggestion on version management - as I still have the hypothesis this is version mis-matches somewhere you might convert to the "bill of materials" style of version specifying for firestore, and this one is the last one before AndroidX https://firebase.google.com/support/release-notes/android#bom_v19-0-0 Then you use it like so implementation platform("com.google.firebase:firebase-bom:24.0.2")
implementation "com.google.firebase:firebase-auth"
implementation "com.google.firebase:firebase-analytics"
implementation "com.google.firebase:firebase-perf"
implementation "com.google.firebase:firebase-config"
implementation "com.google.firebase:firebase-functions"
implementation "com.google.firebase:firebase-storage"
implementation "com.google.firebase:firebase-dynamic-links"
implementation "com.google.firebase:firebase-firestore"
implementation "com.google.firebase:firebase-messaging"
implementation 'com.crashlytics.sdk.android:crashlytics' except with the 19.0.0 version. |
Images are difficult to deal with. Copy past the error is better. That's a vital clue that something is wrong with your versions though... |
also, a close examination of |
|
@mikehardy exactly, it crashes due to admod. How can I not include admob in the project? Thank you :) |
I'm not sure I understand? The way to not include admob is...to not include admob? Don't put it in your dependencies in gradle files (or ios Podfile), and don't put it in your java startup list etc. I don't include admob for instance and it's fine |
@mikehardy thank you a lot for your consistent help. I feel like I don't get something obvious here Can you kindly confirm the list of places admod should be eliminated from? I have eliminated from react-native-firebase gradle:
and from android/app/build.gradle: still gives this error at build:
|
@nicoara well, hopefully you get your project working soon, that's the fun part ;-) I think you need to leave the first one alone - I would not go into any gradle files inside react-native-firebase - but definitely remove it from your android/app/build.gradle and remove it from MainApplication and it should work? You can maybe play around with cloning this repo and running https://github.com/mikehardy/rnfbdemo/blob/master/make-demo-rn59.sh paying special attention to https://github.com/mikehardy/rnfbdemo/blob/767046bd5d2d2b15e925922999d3eb23439e90fd/make-demo-rn59.sh#L108 through 121 - I think if you commit every line out there it should build and run. Without admob (or admob crashes). |
@mikehardy your solution solved this error. 4-5 errors fixed later I am not unable of debugging this one. i feel this is the closest so far ! Thank you . the error is: adb logcat shows:
|
hmm - I feel like I saw something similar before and it was a nasty tangle of old libraries that went away as I was developing earlier this year with 0.59.x. Is there any way you can get current on react-native 0.59 (0.59.10 if I recall) and have your config look as close to the template from 0.59.10 as possible? https://github.com/facebook/react-native/tree/v0.59.10/template / https://github.com/facebook/react-native/blob/v0.59.10/package.json indicates react was on 16.8.3 - There is something not-great happening there I think - the error is in the metro package inside react-native, it's not in the app. You may find that a release build works at this point actually |
Hello, making the package react as close to the above (0.59.0) has solved the error and the app is now finally running (after months)! |
Fantastic! And hey, now you are almost current, only the ridiculously painful transition from react-native 0.59 to 0.6x to go 🤣 - but that one at least results in so many improvements (with auto-linking) it's worth it whenever you have time. Good luck with your app |
Thanks, but it seems my road is not done yet. Can you advise me? I get the following error:
|
This doesn't seem like it has anything to do with react-native-firebase. A java compatibility issue with robolectric? Stack overflow had some interesting things but nothing definitive. Java_1_8 mentions and minify mentions, but it's not close enough to firebase for me to know or really help, sorry |
@mikehardy please help me out here. many hours after your last response (the error was from react-native-navigation testing libraries), and other bugs fixed, I upload to the Google Play store and get presented with: 'This release is not compliant with the Google Play 64-bit requirement'. I am stunned by this - I have react-native 0.59.0. What is the lowest RN version that is 64 bit? Thank you! |
react-native 0.59 is 64-bit, react-native 0.58 was the last version that was not. Not sure where are starting out but the upgrade-helper site can show how to get your android build stuff (gradle build scripts) set up correctly perhaps https://react-native-community.github.io/upgrade-helper/?from=0.58.6&to=0.59.0 |
Thank you. I have slayed the dragon and published on the appstore. Many thanks, good fellow! |
Issue
🔥
at react-native run-android, i get the following error:
com.android.build.api.transform.TransformException: Error while generating the main dex list
Project Files
iOS
Click To Expand
ios/Podfile
:# N/A
AppDelegate.m
:// N/A
Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:android/app/build.gradle
:android/settings.gradle
:MainApplication.java
:AndroidManifest.xml
:Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:5.3.0
Firebase
module(s) you're using that has the issue:e.g. Instance ID
TypeScript
?N
Think
react-native-firebase
is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: