Android Emulator: PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value

Published 2018-11-16, 17:38

Debugging and fixing a broken Android SDK setup is always „fun“ – especially on a CI environment where you don’t control the actual installation.

It gets worse when all the StackOverflow answers and other Google results for the error you are getting are basically „I executed some slightly related, but otherwise random commands, and after that it worked“.

In my specific case I was getting this error message when trying to start an Android Emulator:

PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value

It was really hard to find out what „AVD system path“ actually meant and how my ANRDOID_SDK_ROOT could be connected to that.

So to maybe make this search a bit easier for future people having this problem, I write a solution down here:

Fortunately, after a lot of googling I found a StackOverflow question that had a comment linking to an answer of another question: https://stackoverflow.com/a/44386974/252627

Here, under the headline „Incomplete/corrupted SDK stucture“, Oleg Cherr explains what is actually wrong and how it can be understood and fixed.

These 2 errors happen if the emulator cannot find the SDK, or the SDK is broken.

[…]

2. Go to <user_home>/.android/avd/<avd_name> and open config.ini. Find the image.sysdir.1 property. It points at the directory, inside the SDK directory, that contains the actual system image. Make sure that this directory exists and contains files like build.prop, system.img, etc. If it doesn’t, then you have to open the SDK Manager and download system images your AVD requires (see below).

[…]

https://stackoverflow.com/a/44386974/252627

Using this information, I could look at these files and debug my problem:

In my case image.sysdir.1 had /sdk at the end, which was already part of ANDROID_SDK_ROOT because of the way Android SDK was installed and set up on the environment I was working on.

Interesting enough I could fix it by using $ANDROID_SDK_ROOT/emulator/emulator instead of $ANDROID_SDK_ROOT/../tools/emulator as the binary to start the emulator – probably because the context is a different one here.

Topic(s): Development, Link No comments - :(

Diskussion zum Artikel

» Selbst kommentieren

  1. Zum Artikel Android Emulator: PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value sind noch keine Kommentare vorhanden. Deine Meinung wäre jedoch willkommen!

Selbst kommentieren

Trackback-URI, Kommentarfeed. XML-Feed





15 queries. 0,098 seconds.