You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

请求权限时模拟器出现System UI停止问题求助(真机正常)

Fixing "System UI has stopped" Crash on Emulator When Requesting Permissions

Hey there, let's work through this frustrating System UI crash issue you're facing on your emulator. Since you've already tried the common fixes from those threads, let's jump into some targeted, less obvious solutions that might resolve this:

  • Wipe emulator data completely
    Corrupted cache or permission-related leftover data is often the culprit here. Head to your AVD Manager, select the problematic emulator, click the three-dot menu (⋮), and choose "Wipe Data". This resets the emulator to a fresh out-of-the-box state, which frequently clears stubborn permission-triggered crashes.

  • Switch to a different system image
    Emulator bugs can be tied to specific API levels or image variants. Try testing with a different API version (e.g., if you're on API 33, give API 32 or 34 a shot) or switch between Google Play and Google APIs images. Don't forget to download the latest version of the image via the SDK Manager first.

  • Turn off Instant Run temporarily
    Instant Run can sometimes interfere with permission handling on emulators. Go to Android Studio Settings > Build, Execution, Deployment > Instant Run, uncheck "Enable Instant Run to hot swap code/resource changes on deploy", then run ./gradlew clean build to rebuild your project and restart the emulator.

  • Double-check your permission request code
    Even though it works on physical devices, emulators can be finicky about permission flows. Make sure you're using the modern ActivityResultContracts.RequestMultiplePermissions instead of deprecated methods like checkSelfPermission. Also, avoid requesting permissions in lifecycle callbacks that might clash with System UI (like a service's onCreate or a non-visible activity's initialization).

  • Tweak emulator hardware settings

    • Boost RAM allocation: Open AVD Manager > Edit AVD > Show Advanced Settings > Memory and Storage, set the RAM to at least 2048MB. Low memory can cause unexpected UI crashes.
    • Try software rendering: Switch the emulator's graphics setting to "Software - GLES 2.0" (found in the same advanced settings menu). Hardware acceleration sometimes causes rendering glitches that trigger System UI failures.
  • Reinstall the Android Emulator component
    Corrupted emulator binaries might be the root cause. Go to SDK Manager > SDK Tools, uncheck "Android Emulator", click Apply to uninstall it, then recheck and reinstall it. This ensures you're working with a clean, up-to-date emulator installation.

内容的提问来源于stack exchange,提问作者João Carlos

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 09:21:31