title: custom Android Virtual Device: System UI Stopped, Launcher Stopped
body: <p>I created an AVD with the properties below to emulate a customer's device. Each time I start it up, it gives the <strong>"Unfortunately, System UI stopped"</strong> dialog and, when dismissed, the <strong>"Unfortunately, Launcher stopped."</strong> dialog.
  Tweaking the parameters (at least, those which don't alter the essential characteristics of the device) using advice from:</p>
  
  <p><a href="https://stackoverflow.com/questions/15678520/android-emulator-error-system-ui-has-stopped#16402304">Android emulator error: &quot;System UI has stopped&quot;</a></p>
  
  <p><a href="https://stackoverflow.com/questions/10422275/unfortunately-system-ui-has-stopped?noredirect=1&amp;lq=1">Unfortunately System UI has stopped</a></p>
  
  <p><a href="https://stackoverflow.com/questions/9155417/android-4-0-emulator-always-has-a-crashing-launcher">Android 4.0 emulator always has a crashing Launcher?</a></p>
  
  <p><a href="https://daviddesmet.wordpress.com/2013/07/26/android-avd-unfortunately-system-ui-has-stopped/" rel="nofollow noreferrer">https://daviddesmet.wordpress.com/2013/07/26/android-avd-unfortunately-system-ui-has-stopped/</a></p>
  
  <p>results in the same outcome.</p>
  
  <p>Variations tried</p>
  
  <ul>
  <li>skin 320x320, 320x321</li>
  <li>Google API / non Google API</li>
  <li>heapsize 16, 32, 64, 128</li>
  <li>mainkeys yes, no</li>
  <li>keyboard yes, no</li>
  <li>ncore 1, 2, 4</li>
  </ul>
  
  <p>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.</p>
  
  <p><strong>config.ini</strong></p>
  
  <pre><code>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
  </code></pre>
  
  <p><strong>Logcat extract: System UI stopped</strong></p>
  
  <pre><code>    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)
  </code></pre>
  
  <p><strong>Logcat extract: Launcher Stopped</strong></p>
  
  <pre><code> 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
  </code></pre>
  
  <p><strong>Environment</strong></p>
  
  <ul>
  <li>Android Studio 2.2.3</li>
  <li>Windows 7 x64</li>
  </ul>
  
  <p><strong>Updates</strong>
  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.</p>