79

Cannot debug application com.domain.test on device samsung-gt_i9300-323020cfc86b804f. This application does not have the debuggable attribute enabled in its manifest. If you have manually set it in the manifest, then remove it and let the IDE automatically assign it. If you are using Gradle, make sure that your current variant is debuggable.

Abdelilah El Aissaoui
  • 4,204
  • 2
  • 27
  • 47
ishq
  • 833
  • 1
  • 6
  • 11
  • 6
    i got solution. i changed build variant debug to release from android studio left corner – ishq Sep 22 '14 at 11:33
  • 7
    That isn't really a solution, just a work around. What attribute needs to be added to the build gradle to make it debuggable? Did you find out? – portfoliobuilder Oct 29 '15 at 17:50
  • 3
    If you're getting this error with IntelliJ IDEA then you can take a look here: https://youtrack.jetbrains.com/issue/IDEA-153902 But the current situation is that JetBrains acknowledges that it's a bug, but it hasn't been fixed yet. – RenniePet Jun 01 '16 at 10:45
  • Try the below solution. It worked for me. https://stackoverflow.com/a/47960002/4675067 – Abish R Dec 24 '17 at 11:08

4 Answers4

153

Your comment has already hinted the answer to this post but since you have not selected an answer I'll write it down.

Change build variant from release to debug from android studio left corner.

**Build variant** tab's default position in AndroidStudio

Klaus
  • 2,460
  • 1
  • 21
  • 23
  • 15
    And how exactly is this an answer? – Debosmit Ray Feb 29 '16 at 09:41
  • @DebosmitRay The author had hinted to the answer instead of giving the answer, but the hint was very useful. Thanks for mentioning it, I changed the answer to exactly address the problem. – Klaus Mar 01 '16 at 07:59
  • 1
    what is left corner? be more specific, make a screenshot please – djdance Apr 20 '16 at 12:28
  • 1
    @djdance, a left bottom corner, where a gray squere is drawn. It opens a menu, where you can find "Build variants". – CoolMind Apr 25 '16 at 07:49
  • that gray square just toggles tools. But what I need is in View/Tool window/Build variants. – djdance Apr 30 '16 at 17:29
  • @djdance, I have just checked your variant, it's the same. Click on a gray square in a left bottom corner. In the left you will see 2 tabs: "Favorites" and "Build Variants". – CoolMind Aug 02 '16 at 09:46
62

A right solution is written in https://stackoverflow.com/a/25628789/2914140: open build.gradle of your module, type: 'debuggable true' (an example is below):

buildTypes {
    release {
        signingConfig signingConfigs.release
        debuggable true
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
    debug {
        applicationIdSuffix ".debug"
        debuggable true
    }
}

When you generate a signed APK from menu, you should edit 'release' branch changing 'debuggable true' to false in order to avoid a debuggable information.

Community
  • 1
  • 1
CoolMind
  • 26,736
  • 15
  • 188
  • 224
3

In build.gradle

debug {
        debuggable true
        signingConfig signingConfigs.debug
    }
0

for whose came here searching TS's quote, check if you set Android Application in Run/Debug configuration popup. Not Native, like in my mistake.

djdance
  • 3,110
  • 27
  • 33