What would happen if Android app is released with debuggable on?
how would it manifest to a user?
A normal user won't notice the difference.
By the way:
Support for a true debug build. Developers no longer need to add the android:debuggable attribute to the 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.
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"
You uploaded a debuggable APK. For security reasons you need to disable debugging before it can be published in Google Play-Upload apk to google play
Don't use the debug variant output! Build a release apk. You can do that in Android Studio by going to the menu Build -> Generate Signed APK. Or by executing ./gradlew assembleRelease if you have properly configured signing in the build file.
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
Check if an Android app has been released: Jenkins does not make an app debuggable
You could allow your application to look at an external storage location on your device and
use the url in that file if found.
No file...normal processing
File found use that url.
This would allow you to point any application build (production or test) at any
server url
If debugable is set to false or true it changes nothing
The answer to this very question is already given on SO.
See Android 'debuggable' default value.
How do I detect if I am in release or debug mode?
The simplest, and best long-term solution, is to use BuildConfig.DEBUG
. This is a boolean
value that will be true
for a debug build, false
otherwise:
if (BuildConfig.DEBUG) {
// do something for a debug build
}
There have been reports that this value is not 100% reliable from Eclipse-based builds, though I personally have not encountered a problem, so I cannot say how much of an issue it really is.
If you are using Android Studio, or if you are using Gradle from the command line, you can add your own stuff to BuildConfig
or otherwise tweak the debug
and release
build types to help distinguish these situations at runtime.
The solution from Illegal Argument is based on the value of the android:debuggable
flag in the manifest. If that is how you wish to distinguish a "debug" build from a "release" build, then by definition, that's the best solution. However, bear in mind that going forward, the debuggable
flag is really an independent concept from what Gradle/Android Studio consider a "debug" build to be. Any build type can elect to set the debuggable
flag to whatever value that makes sense for that developer and for that build type.
My Android app only crashes when not debuggable?
as @laalto said, there's a stacktrace that can be helpful
Putting this in my proguard file:
-keepattributes SourceFile,LineNumberTable
helped me find where the error was. This shows you the original classnames and linenumbers in the stacktrace. I'm still not sure why the error doesn't occur for debug mode, but at least I was able to solve it. Thanks again!
Related Topics
Mediarecorder Issue on Android Lollipop
Android Viewmodel Has No Zero Argument Constructor
How Disable/Remove Android Activity Label and Label Bar
Change Button Text and Action - Android Development
Does Android Service Run from a Separated Thread Instead of UI
Confused About Testcompile and Androidtestcompile in Android Gradle
How to Create a Persistent Alarmmanager
How to Disable Viewpager Adapter on Touching Specific Views
Videoview Onresume Loses Buffered Portion of The Video
Inform Activity from a Broadcastreceiver Only If It Is in The Foreground
Fragmentmanager Is Already Executing Transactions. When Is It Safe to Initialise Pager After Commit
How to Deal with Deprecated Classes in Android to Keep Compatibility
How to Place App Icon on Launcher Home Screen
Get Application Installed Date on Android
How to Store Files Generated from App in "Downloads" Folder of Android
How to Fetch Data from a Web Server in an Android Application