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

@diego-barreto

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


cd android //Navigate into the android folder from the root directory

gradlew clean // Run this


Create rn.sh file in your root of React native project with following content

 cd android/app/
 rm -rf build
 cd ..
 cd ..
react-native run-android

Then run from terminal or cmd

./rn.sh

Recommendation

VSCode must be run as Admistrator or GitDesktop must be run as Administrator