gpt4 book ai didi

java - mac M1 上的 Android Studio

转载 作者:行者123 更新时间:2023-12-05 03:40:55 25 4
gpt4 key购买 nike

我正在尝试在我的 Macbook 13"M1 上使用 Android Studio(Arctic Fox 2020.3.1 Beta 3)设置 Flutter,但我无法通过 flutter doctor 获得以下信息:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.1, on macOS 11.3 20E232 darwin-arm, locale de-DE)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[!] Android Studio
✗ Unable to find bundled Java version.
[✓] VS Code (version 1.56.2)
[✓] Connected device (3 available)

当我尝试接受 android 许可时,出现此错误:

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 5 more

最佳答案

检查这个问题:https://github.com/flutter/flutter/issues/81909

具体来说,这部分:

Go to sdk manager, and download Android SDK command line tools and try again

关于java - mac M1 上的 Android Studio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67961759/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com