Android Device Emulator: Unfortunately, System UI has stopped

In my journey to develop Android apps I got a non pleasant surprise when starting a custom AVD (Android Virtual Device) from the Manager.

This however happened when using an AVD with Android 4.0.3 as the target, with my other (4.2.2) setup I didn’t have such problem.

This is the message I was having when starting the AVD:

unfortunately-system-ui-has-stopped

When clicking OK, I immediately noticed that there are no action bar at the bottom. So, I started looking at the configuration of both AVDs and didn’t found any problem, as expected, since there aren’t too many choices when creating the virtual device.

But looking at the Details, I found out that many options in there are not available when creating or editing the AVD. After this, I went to the folder where the AVD resides (C:\Users\[User Name]\.android\avd\[the AVD with the problem]) and right-clicked and opened the config.ini file.

By analysing the configuration, I inferred that the problem could be in the hw.mainKeys option, since the other options didn’t have anything related to the problem I was having. So, I changed the value from no to yes, if there was a new problem, I could safely revert the value back.

avd-config

I saved the changes and started again the AVD and voilĂ , the error was gone!

In summary, all that has to be done is edit the config.ini file located at the path shown in the AVD details window, and change the value to hw.mainKeys=yes

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s