Android Studio - no debuggable applications

前端 未结 16 2233
遇见更好的自我
遇见更好的自我 2020-12-02 04:42

I tried to debug a release version of my Android application but Android Studio failed to attach a debugger. (It could not find Android procces of my running application).

相关标签:
16条回答
  • 2020-12-02 05:07

    Make sure your build variant is set to "debug". And debug has debuggable true on your build.gradle file

    0 讨论(0)
  • 2020-12-02 05:08

    Check if Tools->Android->Enable ADB Integration is enabled. Also disable and re-enabling it works most of the times.

    0 讨论(0)
  • 2020-12-02 05:08

    Believe it or not,a faulty USB cable can cause this problem to linger even if you follow all the suggestions here.Changing my USB cord did it for me

    0 讨论(0)
  • 2020-12-02 05:11

    The solution is to turn on debuggable flag (debuggable true) in application's gradle file:

    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 19
        buildToolsVersion "20.0.0"
    
        defaultConfig {
            applicationId "org.example"
            minSdkVersion 14
            targetSdkVersion 19
            versionCode 1
            versionName "1.0"
        }
    
        buildTypes {
            debug {
                debuggable true
            }
        }
    }
    

    After Android Studio synced Gradle with project files and reinstalled an application, the debugging start working.

    0 讨论(0)
  • 2020-12-02 05:18

    Click the green bug, but make sure the drop down is set to app, if not it will not deploy your app, and just say something about.

    Connected to the target VM, address: 'localhost:xxx', transport: 'socket'

    0 讨论(0)
  • 2020-12-02 05:19

    You also should have Tools->Android->Enable ADB Integration active.

    0 讨论(0)
提交回复
热议问题