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

Diego Barreto :

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.

Bashirpour :

@diego-barreto

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

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=432872&siteId=1