0

我对在 react-native 中构建应用程序是全新的,当我构建我的应用程序时出现此错误,我尝试在谷歌中搜索但找不到任何有用的结果,所以请帮我解决这个问题。

这是我在运行时遇到的错误:

:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources
:app:recordFilesBeforeBundleCommandDebug
:app:bundleDebugJsAndAssets SKIPPED
:app:generateBundledResourcesHashDebug
4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
                                                             :app:processDeb
ugManifest                                                                        U
P-TO-DATE
:app:processDebugResources
Unknown source file : ERROR: Unable to open class file ...
roject\android\app\build\generated\source\r\debug\com\newapp\R.java: Permission denied

:app:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException:     org.gradle.process.internal.ExecException: Process 'command 'C:\..\AppData\Local\Android\sdk\build-tools\23.0.1\aapt.exe'' finished with non-zero exit value 1
4

1 回答 1

0

对我来说,它有助于将 buildTools 的版本更改为:

buildToolsVersion "21.0.1"

您将在文件 app/build.gradle 中找到此设置。

于 2017-03-04T15:35:25.923 回答