从React Native生成APK文件时出错

时间:2019-11-30 14:33:38

标签: android reactjs react-native apk

> 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 33s
1 actionable task: 1 executed

1 个答案:

答案 0 :(得分:0)

看来root的build.gradle版本有问题:

1-打开Android Studio 2-打开您项目的android文件夹 3-android studio将自动升级gradle版本(确保已完成) 再次尝试4次以生成apk