在执行发布构建android react-native
时$ ./gradlew assembleRelease
最后抛出的后续错误。
Loading dependency graph, done.
ENOTEMPTY: directory not empty, rmdir '/tmp/react-native-packager-cache-02b2ace9b81fa119b172fdfd36d3a3b4e4156b70/cache'
:app:bundleReleaseJsAndAssets FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> Process 'command 'node'' 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.
BUILD FAILED
我正在使用
"react": "16.0.0-beta.5",
"react-native": "0.49.3",
请指导
答案 0 :(得分:1)
尝试./gradlew clean
,然后./gradlew assembleRelease
。它应该工作。
答案 1 :(得分:0)
我尝试了以下方法,并且对我有用
1)键入 rm -rf〜。/ rncache ,然后按Enter。
2)watchman watch-del-all; npm start---reset-cache
3)从项目中删除 node_modules 文件夹。
4)现在运行 npm install
5)最后 react-native run-android
希望它会起作用。