Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not Able To Debug App In Android Studio

I am making an app in Android Studio, now trying to debug it through adb. When I click on the word Android and the logo on the bottom bar, logcat comes up and recognizes my device. Then I see this:

screenshot

What do I need to do to my app to make it "debuggable"?

FYI was developing this app in Eclipse before and adb worked fine.

like image 917
Andy Roy D. Avatar asked May 25 '13 21:05

Andy Roy D.


People also ask

How do I enable debug on APK?

To start debugging an APK, click Profile or debug APK from the Android Studio Welcome screen. Or, if you already have a project open, click File > Profile or Debug APK from the menu bar. In the next dialog window, select the APK you want to import into Android Studio and click OK.

How do I select an Android app to debug?

Navigate to Settings -> System -> Developer options and then scroll to the Debugging section. Click on “Select debug app”. Select the application you want to debug from the list.


2 Answers

I solved this issue after doing the following steps:

Go to Tools==>android==>Disable ADB integration and enable it again.

After that, unplug USB from device and plug in again.

Finally press shift + F9

like image 123
Prathamesh Gujar Avatar answered Sep 28 '22 07:09

Prathamesh Gujar


There is a Debug icon on the toolbar. It looks like a little "bug" and is located right next to the Run icon (which looks like a play button). Try launching the application with that.

Click here to debug

Edit: The following is deprecated when using Android Studio with Gradle.

There is also a debug flag in the AndroidManifest.xml file. It is located under the application tag, and should be set to "true", as follows:

<application android:debuggable="true"> </application> 
like image 29
free3dom Avatar answered Sep 28 '22 06:09

free3dom