What kind of permission/Flag do I have to add to the manifest to debug my application on an actual Android device?
android:debuggable="true" to the
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