I created an AVD with the properties below to emulate a customer's device. Each time I start it up, it gives the "Unfortunately, System UI stopped" dialog and, when dismissed, the "Unfortunately, Launcher stopped." dialog. Tweaking the parameters (at least, those which don't alter the essential characteristics of the device) using advice from:
Android emulator error: "System UI has stopped"
Unfortunately System UI has stopped
Android 4.0 emulator always has a crashing Launcher?
https://daviddesmet.wordpress.com/2013/07/26/android-avd-unfortunately-system-ui-has-stopped/
results in the same outcome.
Variations tried
- skin 320x320, 320x321
- Google API / non Google API
- heapsize 16, 32, 64, 128
- mainkeys yes, no
- keyboard yes, no
- ncore 1, 2, 4
I'm eventually going to borrow a device but hope to get a head start on things before the project start date so would be extremely grateful to hear of any workarounds other than those already attempted.
config.ini
Name: 3.0_Motorola_MC3200_API_16
CPU/ABI: Google APIs Intel Atom (x86)
Path: C:\Users\me\.android\avd\3.0_Motorola_MC3200_API_16.avd
Target: google_apis [Google APIs] (API level 16)
Skin: 320x320
SD Card: C:\Users\me\.android\avd\3.0_Motorola_MC3200_API_16.avd\sdcard.img
hw.dPad: no
runtime.network.speed: full
hw.accelerometer: yes
hw.device.name: 3.0" Motorola MC3200
vm.heapSize: 128
skin.dynamic: yes
hw.device.manufacturer: User
hw.gps: no
hw.initialOrientation: Portrait
skin.path.backup: _no_skin
image.androidVersion.api: 16
hw.audioInput: yes
image.sysdir.1: system-images\android-16\google_apis\x86\
hw.keyboard.lid: yes
tag.id: google_apis
showDeviceFrame: no
hw.camera.back: emulated
hw.mainKeys: yes
AvdId: 3.0_Motorola_MC3200_API_16
hw.camera.front: emulated
hw.lcd.density: 160
avd.ini.displayname: 3.0 Motorola MC3200 API 16
hw.gpu.mode: auto
hw.device.hash2: MD5:799ea57969b556677321dbf45a563939
hw.ramSize: 1024
hw.trackBall: no
hw.battery: yes
hw.cpu.ncore: 4
hw.sdCard: yes
tag.display: Google APIs
runtime.network.latency: none
hw.keyboard: yes
hw.sensors.proximity: no
disk.dataPartition.size: 800M
hw.sensors.orientation: no
avd.ini.encoding: UTF-8
hw.gpu.enabled: yes
Logcat extract: System UI stopped
01-23 12:31:05.364 1401-1453/system_process D/Tethering: MasterInitialState.processMessage what=3
01-23 12:31:11.584 1401-1414/system_process W/ActivityManager: Activity idle timeout for ActivityRecord{aedb9d20
com.android.launcher/com.android.launcher2.Launcher}
01-23 12:31:11.724 1401-1414/system_process W/ActivityManager: Launch timeout has expired, giving up wake lock!
01-23 12:31:12.234 1401-1414/system_process W/ActivityManager: Activity idle timeout for ActivityRecord{aedbcc68
com.android.launcher/com.android.launcher2.Launcher}
01-23 12:31:21.514 1401-1415/system_process W/ActivityManager: Timeout executing service: ServiceRecord{aedd3bc8 com.android.systemui/.SystemUIService}
01-23 12:31:21.514 1401-1415/system_process I/ActivityManager: Crashing app skipping ANR: ProcessRecord{aedd43e8 1462:com.android.systemui/u0a35}
Executing service com.android.systemui/.SystemUIService
01-23 12:31:21.584 1401-1414/system_process W/ActivityManager: Activity destroy timeout for ActivityRecord{aedb9d20
com.android.launcher/com.android.launcher2.Launcher}
01-23 12:31:31.704 1158-1584/? I/SurfaceFlinger: Boot is finished (31860 ms)
01-23 12:31:31.704 1401-1434/system_process W/WindowManager: ***** BOOT TIMEOUT: forcing display enabled
01-23 12:31:41.574 1401-1489/system_process E/ThrottleService: problem during onPollAlarm: java.lang.IllegalStateException: problem parsing stats:
java.io.FileNotFoundException: /proc/net/xt_qtaguid/iface_stat_all: open failed: ENOENT (No such file or directory)
Logcat extract: Launcher Stopped
01-23 12:29:01.332 1407-1527/system_process I/ActivityManager: Start proc com.android.launcher for activity
com.android.launcher/com.android.launcher2.Launcher: pid=1793 uid=10019 gids={1028}
01-23 12:29:01.342 1793-1793/com.android.launcher E/Trace: error opening trace file: Permission denied (13)
01-23 12:29:01.352 1793-1793/com.android.launcher I/ActivityThread: Pub com.android.launcher2.settings: com.android.launcher2.LauncherProvider
01-23 12:29:01.372 1793-1793/com.android.launcher W/ResourceType: Failure getting entry for 0x7f03000d (t=2 e=13) in package 0 (error -75)
01-23 12:29:01.372 1793-1793/com.android.launcher D/AndroidRuntime: Shutting down VM
01-23 12:29:01.372 1793-1793/com.android.launcher W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0xae6de228)
01-23 12:29:01.372 1793-1793/com.android.launcher E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo
{com.android.launcher/com.android.launcher2.Launcher}: android.content.res.Resources$NotFoundException: Resource ID #0x7f03000d
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f03000d
at android.content.res.Resources.getValue(Resources.java:1013)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2103)
at android.content.res.Resources.getLayout(Resources.java:852)
at android.view.LayoutInflater.inflate(LayoutInflater.java:394)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at com.android.internal.policy.impl.PhoneWindow.setContentView
(PhoneWindow.java:256)
at android.app.Activity.setContentView(Activity.java:1867)
at com.android.launcher2.Launcher.onCreate(Launcher.java:361)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
01-23 12:29:01.392 1793-1795/com.android.launcher D/dalvikvm: GC_CONCURRENT freed 232K, 6% free 6147K/6535K, paused 11ms+0ms, total 14ms
01-23 12:29:01.392 1407-1590/system_process W/ActivityManager: Force finishing activity com.android.launcher/com.android.launcher2.Launcher
Environment
- Android Studio 2.2.3
- Windows 7 x64
Updates I have removed and reinstalled SDK and Android Studio. I am able to replicate this on 2 development machines (so far) so would be useful to discover if anyone else experiences this behaviour for this config.