0

Iam completely new to building app in react-native and when i was building my app i get this error, i tried searching in google but couldn't find any results which is helpful so please kindly help me solve this.

This is the error i get when running:

: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
Plaoe
  • 1
  • 1

1 Answers1

0

For me it helped to change the version of buildTools to:

buildToolsVersion "21.0.1"

You will find this setting inside the file app/build.gradle.

Ahsan Azwar
  • 328
  • 1
  • 5
  • 12