Difference between development and release builds for Android?


#1

I know for iOS the app is actually built using a different certificate that doesn’t allow debugging of the app. What is the difference for Android when I build with the --release parameter instead of just building a development version without?


#2

In a release build all debug flags are turned off. The Android apk isn’t signed yet though, and you don’t need to sign it if you don’t plan to upload it to the app store. So there isn’t a certificate involved.


#3

Okay thanks, so similar to iOS.

What do these “debug flags” change exactly?


#4

I don’t know the specifics (and I just looked because I don’t like saying I don’t know, and the answer doesn’t seem to be well documented), but they provide useful information to the Chrome debugger.


#5

You can also create a file that contains your signing keys and so when you run --release Cordova will sign and align your APK.


#6

AFAIK, there’s only one and it just tells the OS whether or not the app is supposed to be debuggable. If it’s not set, then you can’t attach to the process with adb or any other tool that communicates using the same protocol (like Chrome’s developer tools).