Can Not Set Debuggable Flag in Androidmanifest.Xml

Can not set debuggable flag in AndroidManifest.xml

See official doc for SDK Tools, Revision 8 (December 2010)

Support for a true debug build. Developers no longer need to add the
android:debuggable attribute to the <application> tag in the manifest
— the build tools add the attribute automatically. In Eclipse/ADT, all
incremental builds are assumed to be debug builds, so the tools insert
android:debuggable="true". When exporting a signed release build, the
tools do not add the attribute. In Ant, a ant debug command
automatically inserts the android:debuggable="true" attribute, while
ant release does not. If android:debuggable="true" is manually set,
then ant release will actually do a debug build, rather than a release
build.

Update

If you really want to disable checking for debuggable flag in Eclipse you should do next:

  1. Go to the Project Preferences:
  2. Select Android Lint Preferences
  3. Find HardcodedDebugMode Id in Security section and select it
  4. Change the value of Severity to Warning for example.
  5. Apply and Ok.

Screen for details: Sample Image

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

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

More info here.

How can I detect whether an Android APK has debuggable set to true or false in its manifest without installing it?

This is one of those "easy once you know how" things - Use the aapt tool to inspect the manifest.

aapt dump xmltree YourApp.apk AndroidManifest.xml | grep debuggable

That command will give you a dump of the compiled form of the AndroidManifest.xml file- the output will look something like

A: android:debuggable(0x0101000f)=(type 0x12)0x0

(Actual output from my command prompt) in that example, the 0x0 indicates false.

Android error when I set android:debuggable = false or true

This is NOT an error, merely a warning. You can still compile, debug & run your application on emulators / devices. When you export your application to create a release build, by default this APK is NOT debuggable, since this APK will be released to users, but the APK you are currently building is debugabble by default, so if you wish you can remove the android:debuggable tag.

References:

1. SDK Tools

In the above link go to SDK Tools, Revision 8 and there see General Notes.

2. Setting up a Device for Development

My debug AndroidManifest.xml is giving me cannot resolve symbol errors

Go to File > Invalidate Caches / Restart and Invalidate and Restart.

This cleared the errors for me.

How to set debuggable flag for chrome?

Remote debugging using Chrome appear in embedded WebView on Android only starting from Android 4.0. More details on Google website:

https://developer.chrome.com/devtools/docs/remote-debugging

In Cordova itself, remote debugging land in 4.4 version

Android: how to mark my app as debuggable?

By putting android:debuggable="true" in your manifest file, application will go in debug mode, that means android will manage all logs file regarding your application. But make sure put it again false(or remove this tag) if application will going to live or for release mode.


<manifest xmlns:android="http://schemas.android.com/apk/res/android"
...
<application android:icon="@drawable/icon"
android:debuggable="true"

Getting debuggable value of androidManifest from code?

Use PackageManager to get an ApplicationInfo object on your application, and check the flags field for FLAG_DEBUGGABLE.

boolean isDebuggable = (0 != (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE));


Related Topics



Leave a reply



Submit