Current location - Quotes Website - Signature design - The difference between the released version and the debugged version of the signed apk exported in android studio.
The difference between the released version and the debugged version of the signed apk exported in android studio.
Debugging is usually called debugging version. With the cooperation of a series of compilation options, the compiled results usually contain debugging information without any optimization, thus providing developers with powerful application debugging capabilities.

Release is usually called the release version, which is for users. Ordinary customers are not allowed to debug on the release version. Therefore, debugging information is not saved, and in order to achieve the least code and the best speed, it is often optimized. And provides convenience for users.

(1) Debugging programs are usually slower than publishing programs, especially when it is convenient to process videos. Publishing is much faster than debugging. When debugging a program in release mode, a variable is often initialized, but when looking at its value, it is found to be a random number, not an initialized value. Sometimes, when monitoring a variable, it will be impossible to find it.

(2) debug and release do different things when initializing variables. Debug allocates each byte to 0xcc, while the allocation of release is almost random. This is the simplest and most effective way to initialize the default value of a variable immediately after it is declared, otherwise if the project is too big, you will have nowhere to find it. There is an error in the code that may be ignored in debugging mode. In debugging mode, most arrays will not go wrong when crossing the line, but they will be exposed in release, which is difficult to find.

(3) Only the debugging version of the program can set breakpoints, single-step execution, use TRACE/ASSERT and other debugging output statements. REALEASE does not contain any debugging information, so it is small in size and fast in running.