我只是尝试安装颤振,并且因为我已经安装了android studio和android sdk,所以我只是跟随了flutter的安装。这是我的问题:当我跑步时
flutter doctor
告诉我
[√] Flutter (Channel beta, v0.1.5, on Microsoft Windows [Version 10.0.16299.248], locale en-US) • Flutter version 0.1.5 at C:\Users\Name\git\flutter • Framework revision 3ea4d06340 (2 weeks ago), 2018-02-22 11:12:39 -0800 • Engine revision ead227f118 • Dart version 2.0.0-dev.28.0.flutter-0b4f01f759 [X] Android toolchain - develop for Android devices X ANDROID_HOME = C:\Users\Name\AppData\Local\Android\sdk\Android but Android SDK not found at this location. [√] Android Studio (version 3.0) • Android Studio at C:\Program Files\Android\Android Studio • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
这告诉我Flutter找不到我的Android SDK(即使这是android studio也使用的路径-并且android studio工作正常)
我已经尝试过重新安装SDK,但没有成功。
我对此非常感谢。
Flutter提供了一个更新Android SDK路径的命令:
用 flutter config --android-sdk <path-to-your-android-sdk-path>
flutter config --android-sdk <path-to-your-android-sdk-path>