-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Android : Unable to build app #25293
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
com.android.build.api.transform.TransformException: Error while generating the main dex list: |
I am facing same issue. screenshot attached. Environment - my build.gradle file - I also follow link mentioned below but no success - |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@MR03web any idea how to resolve this ? |
Same issue. This happened a few hours ago. RN version 0.59.8 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I am update all dependencies (skip react and react-native). It working for me. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I guess the problem is google play service and firebase just released |
update: This problem seems to be triggered by the version of react-native-device-info?
It working for me. |
This works for me. Upgrade your project to androidx And you need to update your dependencies to androidx as well. Here's a gist to update all dependencies automatically to androidx |
@richieroldan cheers mate |
after making changes suggested by @richieroldan i am getting another issues node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/messaging/RNFirebaseMessagingService.java:51: error: cannot find symbol |
How did you upgrade to androidx by refactoring on androis studio or setting android.useAndroidX=true in gradle.properties ? |
What's in RNFirebaseMessagingService.java:51 ? @cosivox Both |
How to solve this without migrating to AndroidX? |
@richieroldan yes i am using firebase, it was working very well till yesterday |
@Chi-AnTai referred to this earlier and this is the answer. Just follow steps on google dev website. Confirmed working for us now. https://developers.google.com/android/guides/releases Happy building. |
OK, thanks @MR03web What solve my problem is first upgrade react-native-device-info@2.1.2 follow @MR03web then change android build.gradle change gradle-wrapper.properties upgrade Android Studio and from Android Studio Refator => Migrate to AndroidX (before AS upgrade the migration said my android version is not 28 even though my build.gradle is really 28, after upgrade the AS ask me to configure project and the configuration window said my android version is a variable instead of a real number so I change it to 28 and finally I can migrate) I am not sure every step is necessary, I just list what I have done and hope this can help someone. The process is very similar to https://developers.google.com/android/guides/releases, I guess I fail this at first because my Android Studio is not upgrade. |
I fixed it via #25292 (comment) |
Thanks https://github.com/MR03web that solved my problem! Without the need to migrate to AndroidX!
Update
ENV
|
See: #25293 (comment) |
@quarryman the versions are wrong..find out why com.google.firebase:firebase-iid requested version is 19.0.0.. this is the latest version as of yesterdays update.. https://developers.google.com/android/guides/releases Here you can see the dependencies of firebase-messaging 17.0.0. (firebase-iid 16.0.0) @Otik133040040 I would look in every plugin in node_modules android/build.gradle and find if the plugin is using a new version listed in the release note..then I would make the changes suggested by nodece and kelset I hope it helps.. |
As the current maintainer of react-native-device-info we did have a loose ('+') dependency in our build.gradle, but it also checked if you specified a version in android/build.gradle first. You should ALWAYS specify your versions like that in android/build.gradle so that you are not subject to 3rd party module defaults (which may either be loose ('+') or just some incompatible version. Hope everyone gets their gradle files sorted out and has successful builds today |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
A better way to fix asap is to fix google dependencies versions. The issue come from your project dependencies. They may implement google dependencies with a Search in your node_modules if a package implement things like See : https://developers.google.com/android/guides/releases I use I add
And it works for me. Is it possible to overwrite some dependencies from the root project? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
If using
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
try change in your android/build.gradle file
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@kelset Thanks for the workaround! For anyone else that is still having issues, please pay special attention to kelset's comment above:
I had another third-party dependency (
Make sure to check through all your third-party dependency |
Thanks @bonesyblue for the write up, it's way more clear than mine 😅🙇♂️ Given that this issue sort of spinned out of control a bit, I'll lock it for now to keep your comment as the one people will land on 👍 |
EDIT by @kelset:
TL;DR:
:+
form in their gradle configuration:+
gradlew app:dependencies
and searching the output forandroidx
(more details here)Please refer to this comment (and the follow ups) for more details on how to fix - in particular, for debugging, read this comment.
React Native version: 0.58.0
Platform : android
Here are android version:
buildToolsVersion = "27.0.3"
minSdkVersion = 19
compileSdkVersion = 26
targetSdkVersion = 26
supportLibVersion = "26.1.0"
Building app on android before today is working fine.
and suddenly got this issue in android manifest file
.......\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:46:
AAPT: No resource identifier found for attribute 'appComponentFactory' in package 'android'
Steps To Reproduce
Describe what you expected to happen:
Snack, code example, or link to a repository:
The text was updated successfully, but these errors were encountered: