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

  • Post author:
  • Post category:其他


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 目录修改后需要在

local.properties里面修改

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

改为你自己的SDK目录



版权声明:本文为qq_37021554原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。