react本机运行的android sdk不存在
我正在Windows 10系统上执行react本机运行的android sdk不存在,android,windows,react-native,Android,Windows,React Native,我正在Windows 10系统上执行react native。我能够执行react native init AwesomeProject命令来工作,现在我需要执行: >react-native run-android 但这一错误将导致失败: FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':app'. > The SDK dire
react native
。我能够执行react native init AwesomeProject
命令来工作,现在我需要执行:
>react-native run-android
但这一错误将导致失败:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> The SDK directory 'C:\Users\plankton\AppData\Local\Android\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.
BUILD FAILED
Total time: 2 mins 0.64 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
我想问题是我安装了最新的Android SDK,现在路径是:
C:\Users\plankton\AppData\Local\Android\SDK
,而不是C:\Users\plankton\AppData\Local\Android SDK
。如果我在类似Unix的操作系统上运行,我只需要创建一个syslink。但我使用的是Windows10。我能做什么?如何在Windows中创建系统链接?在Windows上,它查看ANDROID_HOME环境变量。您应该能够更新它,关闭命令提示符或powershell并重新启动它,然后重试。在Android local.properties中更改您的
Sdk定位并解决此问题
1响应本机启动--重置缓存
然后转到android文件夹
cd安卓
然后清洁梯度
2级清洁
并确保卸载以前的应用程序