问题描述
当我尝试在 Android Studio 中使用探查器时,我能够看到我连接的设备,但我收到没有可调试的进程"在探查器中.有人可以帮助我为什么我得到没有可调试的进程".
When I try to use profiler in Android Studio, I am able to see my connected device but I am getting "No debuggable process" in the Profiler. Can someone please help me why i am getting "No debuggable process".
推荐答案
您可以尝试以下任何/全部:
You can try any/all of the following:
- 使缓存无效并重新启动
Android Studio
:为此,从菜单栏中选择File
>使缓存无效/重新启动
- 重启手机
- 禁用和启用 USB 调试
- 重新启动计算机
- Invalidating cache and restarting your
Android Studio
: To do this, from the menu bar selectFile
>Invalidate Caches / Restart
- Restart your phone
- Disable and enable USB debugging
- Restart your computer
您还可以检查您的应用是否在 build.gradle
中被标记为可调试.为此,只需转到您的应用程序级 build.gradle
文件,然后在 buildTypes
下检查 debuggable
属性是否设置为 false,如果是,将其更改为 true.类似的东西:
You can also check if your app is marked as debuggable in build.gradle
. To do this, just go to your app-level build.gradle
file, and under buildTypes
check if the debuggable
property is set to false, if yes change it to true. Something like:
buildTypes{
release {
debuggable false
}
debug {
debuggable false
}
}
或者,您也可以通过将以下行添加到 Application
标记下的 Manifest
文件中来执行相同的操作:
Alternatively, to do the same you can also do it the old way by adding the following line to your Manifest
file under the Application
tag:
android:debuggable="true"
这应该可以解决它.
这篇关于“没有可调试的进程"显示在 Android Studio Profiler 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!