任务':app:processReleaseResources'执行失败。

时间:2018-05-23 04:36:59

标签: react-native react-native-android

我正在运行示例应用程序。当我生成apk for android得到这样的错误......

FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':app:processReleaseResources'.
    > Failed to process resources, see aapt output above for details.

    * 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 59s
    39 actionable tasks: 36 executed, 3 up-to-date

请给我任何建议。谢谢。

2 个答案:

答案 0 :(得分:0)

就我而言有帮助:

react-native link

react-native run-android --variant=release

答案 1 :(得分:-1)

您需要删除ios,android和node module文件夹。运行以下命令

1)  npm install //to get the node module folder

2) react-native upgrade //to get android and ios folder

3) react-native link // for linking the libraries

3) react-native run-ios/android