androidandroid-emulatorandroid-virtual-deviceandroid-sdk-toolsavd-manager

Please ensure the file "kernel-ranchu" is in the same location as your system image


I am trying to run an android emulator on Linux mint.

When I try to run the avd , on the emulator, I get the following error.

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

When I navigate to android_sdk/system-images/android-21/default/armeabi-v7a

There exists a kernel file called kernel-qemu

I guess there is some sort of compatibility issue between the emulator and my avd?

Is there a way to resolve this?

Below is the script I use to install my android tools, and create the 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

Solution

  • My solution to this was just to use the android-24 and android-26 system images. They worked when the android-21 did not.