我刚开始跟随Fireship YouTube频道学习Flutter和Dart,但在使用VSCode时遇到了问题。我没有使用过VSCode,所以请别介意我可能不太懂 :D
Neofetch和其他一些信息:
Neofetch和其他一些信息:
-` carrot@CarrotLaptop
.o+` -------------------
`ooo/ OS: Arch Linux x86_64
`+oooo: Host: 82L7 IdeaPad 5 Pro 14ACN6
`+oooooo: Kernel: 5.15.2-arch1-1
-+oooooo+:
`/:-:++oooo+: Packages: 954 (pacman)
`/++++/+++++++: Shell: bash 5.1.8
`/++++++++++++++: Resolution: 1920x1200
`/+++ooooooooooooo/` DE: Plasma 5.23.3
./ooosssso++osssssso+` WM: KWin
.oossssso-````/ossssss+` Theme: Breeze Light [Plasma], Breeze [GTK2/3]
-osssssso. :ssssssso. Icons: [Plasma], breeze-dark [GTK2/3]
:osssssss/ osssso+++. Terminal: alacritty
/ossssssss/ +ssssooo/- CPU: AMD Ryzen 7 5800U with Radeon Graphics (16) @ 1
`/ossssso+/:- -:/+osssso+- GPU: AMD ATI 04:00.0 Cezanne
`+sso+:-` `.-/+oso: Memory: 4527MiB / 13916MiB
`++:. `-/+/
.` `/
$ java -version
openjdk version "17.0.1" 2021-10-19
OpenJDK Runtime Environment (build 17.0.1+12)
OpenJDK 64-Bit Server VM (build 17.0.1+12, mixed mode)
当我尝试创建Android模拟器时,我在VSCode中遇到了这个错误:avdmanager is missing from the Android SDK
。虽然当我运行avdmanager
时,它会显示路径并输出响应(Java错误),但我的笔记本电脑相当新,所以我认为可能是缺少某些软件。
Java错误信息:
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.AvdManagerCli.run(AvdManagerCli.java:213)
at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 5 more
我按照这个指南 https://docs.flutter.dev/get-started/install/linux,以及从互联网和我自己的知识中获得了一些其他信息。
谢谢!
(编辑:提供更多信息)