[英]flutter doctor --android-licenses Error, how to fix this?
Error: Could not find or load main class M\AppData\Local\Android\Sdk\cmdline-tools\latest\bin\.. Caused by: java.lang.ClassNotFoundException: M\AppData\Local\Android\Sdk\cmdline-tools\latest\bin\错误:无法找到或加载主 class M\AppData\Local\Android\Sdk\cmdline-tools\latest\bin\.. 原因:java.lang.ClassNotFoundException: M\AppData\Local\Android\Sdk\cmdline-工具\最新\bin\
How to fix this issue?如何解决这个问题?
On macbook big sur with m1 chip this work for me:在带有 m1 芯片的 macbook big sur 上,这对我有用:
I hope this work for you:)我希望这对你有用:)
You have not installed Android Studio yet, so install Android Studio, and create a new Android emulator.您还没有安装 Android Studio,所以安装 Android Studio,并创建一个新的 Android 模拟器。 If not, your Java SDK version might be the problem.
如果没有,您的 Java SDK 版本可能是问题所在。 Download JAVA SE 8 from here .
从这里下载 JAVA SE 8。
Uninstall any previously installed JDKs and install this anew.卸载任何以前安装的 JDK 并重新安装。
Copy path of \bin
of the JDK.复制 JDK 的
\bin
路径。
Open Environment Variables in your PC.在您的 PC 中打开环境变量。
Add a new variable JAVA_HOME
with the copied value.使用复制的值添加一个新变量
JAVA_HOME
。
flutter doctor
.flutter doctor
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.