生成发布APK在bundleReleaseJsAndAssets失败
每次我尝试运行: ./gradlew assembleRelease
我得到以下内容:
FAILURE: Build failed with an exception. Execution failed for task ':app:bundleReleaseJsAndAssets'. > A problem occurred starting process 'command 'react-native''
这里是stacktrace的输出: https : //gist.github.com/rpastorelle/f0a42a87656e5326a186de4e34f691a0
如果我使用sudo
来运行这个命令,它会工作。 但是,这主要是拧了一些权限,然后在构builddebugging版本时在Android Studio中出现“无法展开ZIP”错误。
我的全局npm模块在/usr/local/lib/node_modules
&我是拥有该文件夹的用户。 react-native-cli
没有使用sudo
安装。
我的解决方法是运行./gradlew --stop
(停止守护进程)