React Native 0.59.5版本打包Android Apk时报错
ReactNative 版本是0.59.5
1、在sudo su下执行./gradlew assembleRelease
报错:
* What went wrong: Execution failed for task ':app:bundleReleaseJsAndAssets'. > Process 'command 'node'' finished with non-zero exit value 1
Error: Watchman error: resolve_projpath: path
/Users/xx/Desktop/ReactNative/xx
: open: /Users/xx/Desktop/ReactNative/xx: Operation not permitted. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html. events.js:187
解决办法:不能在sudo su下执行./gradlew assembleRelease
2、不在sudo su下执行./gradlew assembleRelease
给项目最高权限
在sudo su下执行chmod -R 777 xx(xx是项目名)
报错
* What went wrong: Execution failed for task ':app:copyReleaseBundledJs'. > Could not copy merged_assets to '/Users/xx/Desktop/ReactNative/xx/android/app/build/intermediates/merged_assets'.
解决办法:执行./gradlew assembleClean