flutter doctor 执行 报错
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.10, on Microsoft Windows [版本 10.0.19044.2846], locale zh-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
X Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 4.2)
[√] Connected device (2 available)
[√] HTTP Host Availability
2.执行 flutter doctor --android-licenses 报错
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
java.lang.UnsupportedClassVersionError: com/android/prefs/AndroidLocationsProvider has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
废话不多,原因:
当前使用的jdk版本太低,博主第一次使用的是jdk1.8,之后换成11.0.1 ,解决了问题
文章来源:https://www.toymoban.com/news/detail-510228.html
备注:更换完jdk以后,一定要记得,as、环境变量配置里面都要改哦(详细的就不多说了,毕竟大家都知道bd的,*-*)文章来源地址https://www.toymoban.com/news/detail-510228.html
到了这里,关于Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this sourc的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!