Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

react-native run-android Building Error ':app:generateDebugBuildConfig'

I am having a problem to build a new project. I am using React-Native and Android Emulator (AVD) but when I use the command react-native run-android I get the following message:

FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':app:generateDebugBuildConfig'.

> java.io.IOException: Could not delete path 'C:\Users\diego\Desktop\Diego\albums\android\app\build\generated\source\buildConfig\debug\com'.

* Try:

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

BUILD FAILED

Total time: 2 mins 47.189 secs

Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/android-setup.html

Here's an image of the prompt: Image of the problem

How can I fix this?

-------------------------------------------------------------UPDATE-------------------------------------------------------

I added the value C:\....\AppData\Local\Android\sdk\tools to the variable Path and I got build sucessful. Problem solved. Yay.

Thanks.

like image 435
Diego Barreto Avatar asked Jul 20 '17 18:07

Diego Barreto


1 Answers

@diego-barreto

Added the value C:\....\AppData\Local\Android\sdk\tools to the variable Path and I got build sucessful. Problem solved. Yay.

like image 199
Mahdi Bashirpour Avatar answered Oct 12 '22 20:10

Mahdi Bashirpour