Execution failed for task ':app:packageRelease' at installRelease
See original GitHub issueI’m using React Native. When I want to lunch my app on Android (real device or emulator), it work perfectly.
But, when I want to creatte an aab
file, I can’t lunch it.
Steps to reproduce :
cd android
on the project../gradlew clean
and then./gradlew bundleRelease
to clean the project and createaab
file.app-release.aab
is now in[your_project]/android/app/build/outputs/bundle/release
- Then,
./gradle installRelease
, orcd ..
andreact-native run-android --variant=release
to lunch theaab
on your device/emulator
When I do the last step, I got this error :
> Task :app:packageRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:packageRelease'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
> java.lang.OutOfMemoryError (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
I looking for the solution but nothing work to solve Execution failed for task ':app:packageRelease'
or A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
I also try to use Android Studio (Clean Project or Invalidate Caches/Restart) but doesn’t work.
Those someone has a solution ? Thanks
Environment Information
react-native-cli: 2.0.1
react-native: 0.63.0
gradle: 6.5
System:
OS: macOS 10.15.7
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 182.55 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.18.3 - /usr/local/bin/node
Yarn: Not Found
npm: 6.14.6 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.3, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
Android SDK:
API Levels: 23, 25, 28, 29, 30
Build Tools: 28.0.3, 29.0.3, 30.0.2
System Images: android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.6953283
Xcode: 12.3/12C33 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_242-release - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: ^4.13.0 => 4.13.1
react: ^16.9.0 => 16.14.0
react-native: 0.63.0 => 0.63.0
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (2 by maintainers)
Top Results From Across the Web
Execution failed for task ':app:installRelease' react-native
FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':app:installRelease'. com.android.builder.testing.api.
Read more >task :app:packagedebug failed react native - You.com - You.com
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > com.android.ide.common.signing.KeytoolException: ...
Read more >Execution failed for task ':app:bundleReleaseJsAndAssets'.
execution failed for task ':app:bundlereleasejsandassets'. Add Answer | View In TPC Matrix. Technical Problem Cluster First Answered On August 29, ...
Read more >solved :: Error:Execution failed for task ':app:packageRelease ...
solved ::java - Error:Execution failed for task ':app:packageRelease' in Android Studio can't generate signed APK from Android studio "Execution .
Read more >app:mergeReleaseResources' building APK-React Native
Coding example for the question Error Execution failed for task ':app:mergeReleaseResources' building APK-React Native.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am having the exact same error output but it was at assembleRelease In gradle.properties I add: org.gradle.jvmargs=-Xmx4g It work for me.
Please refer to about how you can increase memory limit for Gradle https://stackoverflow.com/questions/47454257/how-to-increase-maximum-heap-size-for-the-gradle-daemon.