执行|执行 flutter doctor 出错的解决办法
问题1
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.15.2 19C57, locale
zh-Hans-CN)
? Downloaded executables cannot execute on host.
See https://github.com/flutter/flutter/issues/6207 for more information
解决办法:
【执行|执行 flutter doctor 出错的解决办法】flutter upgrade --force
问题 2
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
? Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit
https://flutter.dev/setup/#android-setup for detailed instructions.
解决办法
先执行 flutter doctor -v
发现
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
? Android SDK at /Users/xxx/Library/Android/sdk
? Android NDK location not configured (optional;
useful for native profiling
support)
? Platform android-29, build-tools 28.0.3
? ANDROID_HOME = /usr/local/share/android-sdk
? ANDROID_SDK_ROOT = /usr/local/share/android-sdk
? Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
? Java version OpenJDK Runtime Environment (build
1.8.0_202-release-1483-b49-5587405)
? Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit
https://flutter.dev/setup/#android-setup for detailed instructions.
然后 打开.bash_profile 文件
写入 export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home
然后 在终端 source .bash_profile
搞定
推荐阅读
- CVE-2020-16898|CVE-2020-16898 TCP/IP远程代码执行漏洞
- 字符串拼接成段落,换行符(\n)如何只执行n-1次
- Flutter的ListView
- 运用flutter|运用flutter 构建一个发布版(release)APK
- R语言|R语言 函数
- Flutter自定义view|Flutter自定义view —— 闯关进度条
- 高效执行力第六课-小结
- Flutter|Flutter SwiftUI React 对比
- flutter设置沉浸式状态栏
- 成功通航(用宜搭提升数字化管理效能,确保每次飞行任务安全执行)