android - Build APK in release mode -


i having trouble building apk in release mode. no matter buildconfig.debug flag set true.

i tried following

  1. set android:debuggable="false" in manifest file.

  2. used export option(by right clicking on project in eclipse) create signed apk.

  3. use android tools->export unsigned apk create apk.

but when decompiled code using dex2jar , jd saw buildconfig.debug set true.

also, when used following code in app check debug flag, result 'true'(in both debug , release mode)

toast t=toast.maketext(this, string.valueof(buildconfig.debug), toast.length_long); t.show(); 

please tell me correct method build apk in release mode , protect code decompiling.

please me.

it has been bug adt, still able reproduce https://code.google.com/p/android/issues/detail?id=27940

as workaround may use own boolean toggle (true/false) logging this:

public final class appconfig {    public static final boolean debug = false; }  // , later use if (appconfig.debug) {    log.d(tag, "lorem ipsum.."); } 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -