FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project

时间:2024-03-13 22:36:36
info JS server already running.
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> The SDK directory 'C:\Users\asus\AppData\Local\Android\Sdk' does not exist.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
error 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/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.

安卓sdk 目录修改后需要在

FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project

local.properties里面修改

sdk.dir=H\:\\Android\\Sdk

改为你自己的SDK目录