debugging – What do I have to add to the manifest to debug an Android application on an actual Device?-ThrowExceptions

Exception or error:

What kind of permission/Flag do I have to add to the manifest to debug my application on an actual Android device?

How to solve:

Add android:debuggable="true" to the <application> element

More info here.

###

You shold create a debug specific manifest file (typically in src/debug/AndroidManifest.xml).
To avoid error: “Avoid hardcoding the debug mode.”
If you run/debug application directly throuh IDE, it is automatically build with android:debuggable=”true” flag.

###

The issue is might be you have installed the live app which is not debuggable and you are overwriting with debuggable app. So, uninstall the app which is not debuggable and install your app. I will work. I tried this and worked for me.

Before trying this, make sure you are not in release build variant and in app->build.gradle debuggable true

Leave a Reply

Your email address will not be published. Required fields are marked *