I keep getting this error when trying to generate the APK for my project. I use react native 0.61.5 and I don't install any library.
C:\Users\Ali\Desktop\Desktop\My work\ReactNative\AwesomeProject61\android>gradle
w bundleRelease
> Task :app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
Loading dependency graph, done.
info Writing bundle output to:, C:\Users\Ali\Desktop\Desktop\My
info Writing sourcemap output to:, C:\Users\Ali\Desktop\Desktop\My
info Done writing sourcemap output
info Done writing bundle output
info Copying 1 asset files
Error: EEXIST: file already exists, mkdir 'C:\Users\Ali\Desktop\Desktop\My'
error EEXIST: file already exists, mkdir 'C:\Users\Ali\Desktop\Desktop\My'. Run
CLI with --verbose flag for more details.
> Task :app:bundleReleaseJsAndAssets FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> Process 'command 'npx.cmd'' finished with non-zero exit value 1
* 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
BUILD FAILED in 1m 14s
1 actionable task: 1 executed
C:\Users\Ali\Desktop\Desktop\My work\ReactNative\AwesomeProject61\android>
Have you tried cleaning your Gradle?
Please try this command cd android && ./gradlew clean
run this command on your project's root directory! or ./gradlew clean
in your project's android folder.
after that recompile the App .
If the above solution does not help, try building your release with this command, go to your android folder and run command ./gradlew assembleRelease -x bundleReleaseJsAndAssets
The following command works for me:
gradlew assembleRelease -x bundleReleaseJsAndAssets
Try to install Watchman
Then cd android && ./gradlew app:assembleRelease
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With