Reputation: 241
After upgrading to RN 0.60 - try to run the command:
react-native run-android --variant=release
Failed with error:
Execution failed for task ':app:packageRelease'. 2 exceptions were raised by workers: java.io.UncheckedIOException: java.io.IOException: Execution of compression failed. java.lang.OutOfMemoryError
The solution for me was:
android {
dexOptions {
javaMaxHeapSize "4g"
}
}
org.gradle.jvmargs=-Xmx4608M
Upvotes: 22
Views: 5856
Reputation: 333
The way I solved this issue was
android {
...
dexOptions {
javaMaxHeapSize "4g"
}
...
}
org.gradle.jvmargs=-Xmx4608m
Upvotes: 3
Reputation: 1302
This solution worked for me.
android { ... dexOptions { javaMaxHeapSize "2g" } ... }
org.gradle.jvmargs=-Xmx4608M
Upvotes: 9
Reputation: 13906
Add android:largeHeap="true"
to the application portion of the manifest
.
Don't forget to recycle()
once you've used Bitmap.
Upvotes: 1