2
bruno@ubuntu:/opt/android/android-sdk-linux$ sdkmanager --list
Installed packages:=====================] 100% Computing updates...             
  Path                                    | Version      | Description                    | Location                                
  -------                                 | -------      | -------                        | -------                                 
  build-tools;24.0.3                      | 24.0.3       | Android SDK Build-Tools 24.0.3 | build-tools/24.0.3/                     
  emulator                                | 27.2.9       | Android Emulator               | emulator/                               
  ndk-bundle                              | 17.0.4754217 | NDK                            | ndk-bundle/                             
  patcher;v4                              | 1            | SDK Patch Applier v4           | patcher/v4/                             
  platform-tools                          | 27.0.1       | Android SDK Platform-Tools     | platform-tools/                         
  platforms;android-24                    | 2            | Android SDK Platform 24        | platforms/android-24/                   
  system-images;android-24;default;x86_64 | 8            | Intel x86 Atom_64 System Image | system-images/android-24/default/x86_64/
  tools                                   | 26.1.1       | Android SDK Tools              | tools/

我在创建时收到此错误avd

bruno@ubuntu:/opt/android/android-sdk-linux$ avdmanager create avd -n bruno -k "system-images;android-24;default;x86_64" --device "Nexus 5" --sdcard 100M
Auto-selecting single ABI x86_64========] 100% Fetch remote repository...       
Parsing /opt/android/android-sdk-linux/build-tools/24.0.3/package.xmlParsing /opt/android/android-sdk-linux/emulator/package.xmlParsing /opt/android/android-sdk-linux/ndk-bundle/package.xmlParsing /opt/android/android-sdk-linux/patcher/v4/package.xmlParsing /opt/android/android-sdk-linux/platform-tools/package.xmlParsing /opt/android/android-sdk-linux/platforms/android-24/package.xmlParsing /opt/android/android-sdk-linuxError: AVD not created.24/default/x86_64/package.xmlParsing /opt/android/android-sdk-linux/tools/package.xmlCopying files                                                                   
null

我的爪哇

bruno@ubuntu:/opt/android/android-sdk-linux$ java -version
java version "1.8.0_172"
Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)
4

1 回答 1

2

我刚刚遇到了类似的问题,你得到的错误不是很有帮助,但最重要的是你需要在创建 avd 之前使用 sdkmanager 安装更多的东西。

拆分你得到的错误,你会看到:

Parsing /opt/android/android-sdk-linux/**build-tools**/24.0.3/package.xml
Parsing /opt/android/android-sdk-linux/**emulator**/package.xml
Parsing /opt/android/android-sdk-linux/**ndk-bundle**/package.xml
Parsing /opt/android/android-sdk-linux/**patcher/v4**/package.xml
Parsing /opt/android/android-sdk-linux/**platform-tools**/package.xml
Parsing /opt/android/android-sdk-linux/**platforms/android-24**/package.xml
Parsing /opt/android/android-sdk-linuxError: AVD not created.24/default/x86_64/package.xml
Parsing /opt/android/android-sdk-linux/**tools**/package.xml
Copying files                                                                   
null

现在运行sdkmanager --list以列出所有可用的包。

如果错误输出中缺少任何内容,请安装它。IE

sdkmanager "build-tools:24.0.3"
sdkmanager "ndk-bundle"
sdkmanager "platform-tools"
sdkmanager "platforms;android-24"
sdkmanager "tools"

等等...

于 2019-01-23T12:59:40.603 回答