Current location - Quotes Website - Personality signature - The APP that Android Studio runs on the real machine starts very slowly, but the apk signed after installation is very fast. What's going on here?
The APP that Android Studio runs on the real machine starts very slowly, but the apk signed after installation is very fast. What's going on here?
Android Studio provides two build types, debugging and publishing. By default, debug is used to debug Android projects. There are several differences between debugging and publishing:

Several characteristics of debugging mode:

1. supports breakpoint debugging and log information printing. The value of the debuggable property is true.

2. Use the default keystore of the system to sign the apk file.

3. The code and resource files of 3.apk file are not optimized (including file compression and redundant file deletion).

4. The code is not confusing.

Several characteristics that should be paid attention to in publishing mode:

1. does not support breakpoint debugging. Debugging defaults to false.

2. There is no compressed class file code minifyEnabled, and the default value is false.

3. By default, the uncompressed resource file shrinkResources is false.

4. No custom signature file is specified. By default, the system keystore is used to sign apk.

Direct connection debugging on a real machine is slow, because there are no code and resource files to compress, and breakpoint debugging is supported. On the contrary, the signed apk file is faster, and you can learn more about the configuration information of the Android Studio build file build.gradle