-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[HAS WORKAROUND] Android build fails since 0.71.0-rc.0 tag added #35204
Comments
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@mikehardy I appreciate the advice. I'm just a little concerned that a rc release was able to suddenly break several projects CI builds. Is it truly the right solution that consumers need to fix this locally? |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
@bkasten-rbi absolutely not the I'm not even sure what the root cause is yet, just trying to mention the gradle adjustements I'm aware of that might unblock people if they are stuck |
This is happening because all the templates reference the React Native dependency by range, like You can resolve this problem by forcing the React Native dependency to the version you expect with something like this AFAIK Maven Central is immutable and the published dependency can't removed so this might be the only solution. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
I think this has to do with the publish of the RC to maven central - perhaps that is the root cause, perhaps that is something that does not normally happen such that the [edit: confirmed it was published to maven central, that is triggering this: https://repo1.maven.org/maven2/com/facebook/react/react-native/] I want to amplify the comment from @jaredh is this could use some success reports if others try it:
|
I can confirm that setting the following works:
I'm doing some more testing but would appreciate any other confirmations. Thanks for the information @jaredh ref: https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.ResolutionStrategy.html |
This comment was marked as resolved.
This comment was marked as resolved.
@afturner based on my lookup just now to cross-check that the artifact really does exist on maven central this appears to be the root cause:
Thus I think either workaround - pinning the version in the dep or setting it via resolution strategy are fully functional |
@mikehardy thank you! in addition to that, do we think its possible to remove it from maven until the versioning issue is sorted out? |
@bkasten-rbi maven is immutable. The damage is done, there is no undoing it 😢 (link from jaredh https://central.sonatype.org/faq/can-i-change-a-component/#question) |
Hi, after applying the fix the build in eas works correctly, but when running the application in production in android it crashes at startup. Does it happen to anyone else? any solution? |
Add this fix to your android -> build.gradle file as follows:
What this fix will do is apply an Ref: Fix and updates on Android build failures happening since Nov 4th 2022 #35210 |
This comment was marked as resolved.
This comment was marked as resolved.
I'm trying to apply the fix but i'm getting this error: |
@anveshbabu that is a more brittle version of the recommendation for people on old react-native as it hardcodes the react-native version, we do not recommend it. |
THE CURRENT BEST FIX IS ON #35210There is information there that explains what you need to do, based on what react-native version you are using. Go to that issue and read it, please. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
THE CURRENT BEST FIX IS ON #35210There is information there that explains what you need to do, based on what react-native version you are using. We are working hard to keep that issue up to date as we learn new things Go to that issue and read it, please |
The issue has now been fully addressed, please refer to #35210 (comment) for details |
WORKAROUND
Issue #35210 now has the best description and current best-known fix for the issue
we are working hard to keep that issue up to date as we learn new things
go to the issue and get the workaround: #35210
Original issue report follows:
Description
Builds started failing couple hours ago.
Version
0.68.3
Output of
npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 13.0
CPU: (20) arm64 Apple M1 Ultra
Memory: 2.37 GB / 64.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.15.1 - ~/Library/Caches/fnm_multishells/89099_1667585876627/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 8.11.0 - ~/Library/Caches/fnm_multishells/89099_1667585876627/bin/npm
Watchman: 2022.10.31.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9014738
Xcode: 14.1/14B47b - /usr/bin/xcodebuild
Languages:
Java: 11.0.16.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.3 => 0.68.3
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
npx react-native run-android
Snack, code example, screenshot, or link to a repository
N/A
The text was updated successfully, but these errors were encountered: