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
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.
You also should have Tools->Android->Enable ADB Integration active.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With