Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Release build but debugging enabled

I'm trying to export an Android app. I've selected "Release | ARM".

It creates a bundle and lists it in the archives section but there's a warning next to it that says, "Archive built with debugging enabled".

How can that be, given that it's a release build?

How do switch off debugging?

like image 610
Ian Warburton Avatar asked May 06 '18 19:05

Ian Warburton


People also ask

Can you debug a release build?

You can now debug your release build application. To find a problem, step through the code (or use Just-In-Time debugging) until you find where the failure occurs, and then determine the incorrect parameters or code.

What is the difference between a debug build and a release build?

Major differences are the debug apk and the release apk: For debug builds the apk will be signed with the default debug signing keys with debug flag enabled. For release apk you will have to explicitly specify the apk to sign with and the debug flag will be turned off so that it cannot be debugged.

Is release build faster than debug?

Lots of your code could be completely removed or rewritten in Release mode. The resulting executable will most likely not match up with your written code. Because of this release mode will run faster than debug mode due to the optimizations.

What is difference between release and debug mode?

By default, Debug includes debug information in the compiled files (allowing easy debugging) while Release usually has optimizations enabled. As far as conditional compilation goes, they each define different symbols that can be checked in your program, but they are language-specific macros.


1 Answers

I'm using Visual Studio for Mac and came across this same "Archive built with debugging enabled" warning after creating an archive of the Android project.

To fix this, do the following:

  1. Go into the Android project options (double-click on the Android project).
  2. Select the Compiler options.
  3. In the "Debug information" drop-down menu, select None (mine had the Portable option selected). Do this configuration for the Release build (the "Configuration" drop-down menu at the top says Release (Active)).
  4. Click on the Android Build options and take a look at the "Debugging Options". The Enable developer instrumentation (debugging and profiling)setting should be greyed out (and the checkbox should be unchecked). The setting is greyed out because of what was done in step 3.
  5. Publish the project.

So the problem was that by default the "Debug Information" wasn't set to None.

like image 100
Fritz Lim Avatar answered Sep 25 '22 02:09

Fritz Lim