Skip to content
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

Building Release apk Causes Crash #36633

Closed
humble-programmer opened this issue Mar 24, 2023 · 6 comments
Closed

Building Release apk Causes Crash #36633

humble-programmer opened this issue Mar 24, 2023 · 6 comments
Labels
Resolution: Answered When the issue is resolved with a simple answer Stale There has been a lack of activity on this issue and it may be closed soon. Type: Upgrade Issue Issues reported from upgrade issue form

Comments

@humble-programmer
Copy link

New Version

0.71

Old Version

0.70

Build Target(s)

Android release

Output of react-native info

System:
OS: macOS 12.3.1
CPU: (8) arm64 Apple M1
Memory: 95.72 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 18.14.2 - /opt/homebrew/opt/node@18/bin/node
Yarn: Not Found
npm: 9.5.0 - /opt/homebrew/opt/node@18/bin/npm
Watchman: 2023.02.13.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK:
API Levels: 21, 23, 29, 30, 31, 32, 33
Build Tools: 30.0.2, 30.0.3, 31.0.0, 33.0.0, 33.0.0
System Images: android-23 | Google APIs ARM EABI v7a, android-23 | Google APIs Intel x86 Atom, android-23 | Google APIs Intel x86 Atom_64, android-24 | Google APIs ARM 64 v8a, android-31 | Google APIs ARM 64 v8a, android-33 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 13.3/13E113 - /usr/bin/xcodebuild
Languages:
Java: 11.0.12 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.4 => 0.71.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Issue and Reproduction Steps

When trying to build the release apk, the command I always use is now crashing after upgrading to version 0.71. The command is:
./gradlew clean assembleRelease -x bundleReleaseJsAndAssets

The error message is:
Task 'bundleReleaseJsAndAssets' not found in root project 'ProjectName'

After looking deeper, I figured out that this is happening because react.gradle has been deprecated on version 0.71. It is unclear how else I should build the release apk, because running it without the "-x bundleReleaseJsAndAssets" flag doesn't work either (I started adding the flag long ago because it was always a hassle without it).

@humble-programmer humble-programmer added Needs: Triage 🔍 Type: Upgrade Issue Issues reported from upgrade issue form labels Mar 24, 2023
@Neba-Emmanuel
Copy link

Basically as-is you were telling it to exclude a task that might not be part of your project.
So possibly try running this instead:

./gradlew assembleRelease -x bundleDevReleaseJsAndAssets

@humble-programmer
Copy link
Author

But isn't bundleDevReleaseJsAndAssets for a dev variant? Can it be used for the release/production variant?

@cortinico
Copy link
Contributor

When trying to build the release apk, the command I always use is now crashing after upgrading to version 0.71. The command is:
./gradlew clean assembleRelease -x bundleReleaseJsAndAssets

You should just ./gradlew assembleRelease to create a release APK

@cortinico cortinico added Resolution: Answered When the issue is resolved with a simple answer and removed Needs: Triage 🔍 labels Mar 31, 2023
@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Sep 28, 2023
@popejrh19
Copy link

popejrh19 commented Sep 28, 2023 via email

@cortinico
Copy link
Contributor

Closing as answered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Answered When the issue is resolved with a simple answer Stale There has been a lack of activity on this issue and it may be closed soon. Type: Upgrade Issue Issues reported from upgrade issue form
Projects
None yet
Development

No branches or pull requests

4 participants