Reputation: 393
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>
Upvotes: 15
Views: 31549
Reputation: 31
Removing the space in one of the folders of the project directory solved this issue for me.
from D:\Work Stuff\Project\android
to D:\WorkStuff\Project\android
Then I ran:
./gradlew clean
./gradlew --stop
Afterwards ./gradlew bundleRelease
succeeded.
Upvotes: 3
Reputation: 1
after accordingly install and deploy the keystore file based on documentation use the following line of command to build apk
.\gradlew app:assembleRelease -x bundleReleaseJsAndAssets
Upvotes: 0
Reputation: 1
you can try:
.\gradlew app:assembleRelease -x bundleReleaseJsAndAssets
Upvotes: 0
Reputation: 199
Try to install Watchman
Then cd android && ./gradlew app:assembleRelease
Upvotes: 1
Reputation: 1074
update your Visual C++ and it will fix the issue.
you can download it using this link: The latest supported Visual C++ downloads
Upvotes: -3
Reputation: 1204
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
Upvotes: 17
Reputation: 363
The following command works for me:
gradlew assembleRelease -x bundleReleaseJsAndAssets
Upvotes: 7