Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio - no debuggable applications

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).

Under devices console, there was only a message:

No debuggable applications

like image 610
Ondřej Z Avatar asked Oct 27 '14 18:10

Ondřej Z


People also ask

Where is build variants in Android Studio?

To change the build variant Android Studio uses, select Build > Select Build Variant in the menu bar. For projects without native/C++ code, the Build Variants panel has two columns: Module and Active Build Variant.


2 Answers

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

like image 85
Auras Avatar answered Oct 04 '22 03:10

Auras


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.

like image 20
Ondřej Z Avatar answered Oct 04 '22 02:10

Ondřej Z