我正在尝试在 Linux mint 上运行 android 模拟器。
当我尝试在模拟器上运行 avd 时,出现以下错误。
emulator: ERROR: This AVD's configuration is missing a kernel file! Please ensure the file "kernel-ranchu" is in the same location as your system image.
emulator: ERROR: ANDROID_SDK_ROOT is undefined
当我导航到 android_sdk/system-images/android-21/default/armeabi-v7a
存在一个名为 kernel-qemu 的内核文件
我猜模拟器和我的avd之间存在某种兼容性问题?
有没有办法解决这个问题?
下面是我用来安装我的 android 工具并创建 avd 的脚本...
# use sdkmanager to install all the tools
SDKGET=~/android_sdk/tools/bin/sdkmanager
$SDKGET "build-tools;29.0.2"
$SDKGET "emulator"
$SDKGET "platform-tools"
$SDKGET "platforms;android-21"
$SDKGET "platforms;android-24"
$SDKGET "system-images;android-21;default;armeabi-v7a" # lollipop 5.0
$SDKGET "system-images;android-24;default;armeabi-v7a" # Nougat 7.0
$SDKGET "system-images;android-26;default;x86" # Orea 8.0
# use avdmanager to create the virtual devices
AVDMAKE=~/android_sdk/tools/bin/avdmanager
$AVDMAKE create avd -n Nexus4_5.0_api21 -k "system-images;android-21;default;armeabi-v7a" --device "Nexus 4" # 1280X768
$AVDMAKE create avd -n Nexus5_7.0_api24 -k "system-images;android-24;default;armeabi-v7a" --device "Nexus 5" # 1920 x 1080
$AVDMAKE create avd -n Nexus6P_8.0_api26 -k "system-images;android-26;default;x86" --device "Nexus 6P" # 2560 x 1440