Android Studio 的调试器问题

cyp*_*ics 5 android android-debug android-studio watchface

我正在学习如何在 Android Studio 下开发表盘。我在调试器方面遇到了烦人的问题,这使得使用起来很痛苦。

当我想在调试模式下运行我的脸时,我不断收到以下消息:

...
Waiting for application to come online: com.example.wearmodule.test | com.example.wearmodule
Waiting for application to come online: com.example.wearmodule.test | com.example.wearmodule
Waiting for application to come online: com.example.wearmodule.test | com.example.wearmodule
Waiting for application to come online: com.example.wearmodule.test | com.example.wearmodule
Could not connect to remote process. Aborting debug session.
Run Code Online (Sandbox Code Playgroud)

我似乎唯一的选择是首先在运行模式下执行我的脸,然后将调试器附加到进程。然而,很多时候我不能,因为“确定”按钮是灰色的,如屏幕截图所示:

在此输入图像描述

幸运的是,当我可以附加调试器时,它会在几秒/分钟后不断断开连接,并显示以下消息:

Disconnecting run session: a new debug session will be established.
Run Code Online (Sandbox Code Playgroud)

但没有建立其他会话。这使得调试的过程变得极其不舒服。

我是否错过了 Android Studio 配置中的某些内容?

编辑:可能值得注意的是,即使我只是尝试运行应用程序,我也经常不断收到消息Client not ready yet...。在这些情况下,我必须重新启动模拟器。每次尝试运行该应用程序都会发生这种情况,这让我浪费了很多时间。