“没有可调试的进程"显示在 Android Studio Profiler 中 [英] "No debuggable process" is shown in Android Studio Profiler

查看:217
本文介绍了“没有可调试的进程"显示在 Android Studio Profiler 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在 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:

  1. 使缓存无效并重新启动 Android Studio:为此,从菜单栏中选择 File >使缓存无效/重新启动
  2. 重启手机
  3. 禁用和启用 USB 调试
  4. 重新启动计算机
  1. Invalidating cache and restarting your Android Studio: To do this, from the menu bar select File > Invalidate Caches / Restart
  2. Restart your phone
  3. Disable and enable USB debugging
  4. 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 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆