'无法阅读路径'在react-native上构建失败的错误

时间:2017-09-07 08:08:18

标签: react-native

当我运行react-native run-android时,我第一次在执行cd android && gradlew clean之后运行它,一切运行正常。如果我停止打包器并第二次运行react-native run-android,我会收到此错误:

FAILURE: Build failed with an exception.

* What went wrong:
Could not read path 'C:\ig3\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-fr-rCA'.
> C:\ig3\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-fr-rCA

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

我可以cd android && gradlew clean然后构建运行正常,但下次我运行时,我会得到同样的错误。它总是第二次在gradlew清理后运行我的构建时,我得到了同样的错误。我怎样才能解决这个问题,所以我不需要每次都清理?

非常感谢任何帮助。谢谢!

1 个答案:

答案 0 :(得分:0)

将gradle更新为3.0.1后,将gradle包装器更新为4.1,并将工具版本更新为26.0.2我不再有此问题了。