Why do I see “No Debuggable Applications” in Android Studio Logcat while my application is running?

前端 未结 12 1476
一生所求
一生所求 2021-02-02 06:30

I wanted to filter what is shown in the Android Studio Logcat to show what is relevant to my application only. I have chosen Show only selected applications from th

12条回答
  •  悲哀的现实
    2021-02-02 07:11

    Please make sure to have the android property debuggable = "true" in the application tag AndroidManifest.xml

    ** 
    **
    

    Also, if you have multiple build variants (ex. debug, alpha, release) you may need to check which build you are attempting to debug and set the debuggable true attribute accordingly in the build.gradle

    buildTypes {
        debug {
            ...
            debuggable true
            ...
        }
        alpha {
            ...
            debuggable true
            ...
        }
        release {
            ...
            debuggable false
            ...
        }
    }
    

提交回复
热议问题