Android 模拟器 (Android Studio) 主页按钮不工作并提供 logcat - I/WindowManager : Not starting activity because user setup is in progress

标签 android emulation android-homebutton home-button android-studio-2.0

从 Android Studio 启动了模拟器,但它的主页按钮不起作用。 当我按下主页按钮时,在 logcat 中我可以看到

I/WindowManager: Not starting activity because user setup is in progress: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 (has extras) }

当使用键盘快捷键(键盘主页按钮)时,也会发生同样的情况(相同的 logcat)。

我多次重启模拟器和我的机器,但没有帮助。

我想要实现的是通过长按主页按钮杀死我的应用

模拟器详细信息:

Name: 2_7_QVGA_slider_API_23_L
CPU/ABI: ARM (armeabi-v7a)
Path: C:\Users\sh56000\.android\avd\2_7_QVGA_slider_API_23_L.avd

Target: Android 6.0 (API level 23)
Skin: 240x320
SD Card: 100M
Snapshot: no
hw.dPad: no
runtime.network.speed: full
hw.accelerometer: yes
hw.device.name: 2.7in QVGA slider
vm.heapSize: 16
skin.dynamic: yes
hw.device.manufacturer: Generic
hw.gps: yes
hw.audioInput: yes
hw.keyboard.lid: yes
hw.cpu.model: cortex-a8
tag.id: default
hw.camera.back: none
hw.mainKeys: yes
AvdId: 2_7_QVGA_slider_API_23_L
hw.camera.front: none
hw.lcd.density: 120
runtime.scalefactor: auto
avd.ini.displayname: 2.7 QVGA slider API 23 L
snapshot.present: no
hw.device.hash2: MD5:89d*************55e42054c413
hw.ramSize: 512
hw.trackBall: no
hw.battery: yes
hw.sdCard: yes
tag.display: Default
runtime.network.latency: none
hw.keyboard: yes
hw.sensors.proximity: yes
disk.dataPartition.size: 200M
hw.sensors.orientation: yes
avd.ini.encoding: UTF-8
hw.gpu.enabled: yes

最佳答案

据我所知,这个问题有 3 种解决方案:(2 和 3 需要 adb 驱动程序或终端应用程序)

  1. 切换到客人并回来

Settings->Users->Guest (or)

Swipe down the notification bar and click on profile icon on the left top

  1. 开始初始设置并完成或跳过它

adb shell am start -n com.google.android.setupwizard/.SetupWizardActivity

  1. 给出以下命令以标记设置已完成

adb shell

$ settings --user 0 put secure user_setup_complete 1

关于Android 模拟器 (Android Studio) 主页按钮不工作并提供 logcat - I/WindowManager : Not starting activity because user setup is in progress,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36194962/

相关文章:

Android 模拟器不检测 GPS

java - 使用模拟器和 HttpURLConnection 出现未知主机异常

java - imageview 出现在模拟器中但不出现在测试手机上

android - 主页按钮仅在我自己的应用程序处于前台时不起作用

java - 在 Roboelectric 测试中检查正在运行的服务时出现 Nullpointerexception

android - Facebook 空图形对象

android - 启动 Activity 时停止应用程序进入前台

android - 使用 setDisplayHomeAsUpEnabled(true) 时如何设置 Home-Icon 边距?

android - 仅隐藏复选框而不是 Android 中的文本

android - 在 2 台计算机上的 Android Studio 中开发 - 并且 app.iml 始终更改