gpt4 book ai didi

android - 我无法在 Android Studio 中进行调试。我的服务从不附加到 VM,也从不在断点处停止

转载 作者:太空宇宙 更新时间:2023-11-03 12:50:26 26 4
gpt4 key购买 nike

调试器 View 中的典型输出:

Waiting for device. Target device: unknown_1-stv100_4-1161305457 Uploading file local path: /Users/homedir/devel6/avengers/packages/inputmethods/BlackBerryLatinIME/build/outputs/apk/My_APK_FILE-debug.apk remote path: /data/local/tmp/MY_SERVICE No apk changes detected. Skipping file upload, force stopping package instead. DEVICE SHELL COMMAND: am force-stop MY_SERVICE Waiting for process: MY_SERVICE

然后在 90% 的情况下,它开始向带有消息的 View 屏幕发送垃圾邮件:

Client not ready yet.

最佳答案

我遇到了同样的问题。在我将下面的代码添加到 onCreate() 之后,问题就解决了。

android.os.Debug.waitForDebugger();

在我使用android studio之后,我删除了上面的代码。因为与 eclipse 不同,studio 在没有上述代码的情况下也能很好地工作。但是更新工作室后,我无法调试。如下所示

Waiting for process:
Client not ready yet.
Client not ready yet.
Client not ready yet.

它没有连接到目标虚拟机。

关于android - 我无法在 Android Studio 中进行调试。我的服务从不附加到 VM,也从不在断点处停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32440183/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com