Android Studio: debug type assembly - what relevance does this have?

I just created apk via android studio, and it gave me the opportunity to create my own key, which I made, but then asked what type of assembly it debugs or releases. Also a list of flavors that are not.

Where is this information setting in the gradle file?

So, if I leave the assembly type set to Release, what is its relevance.

I am having trouble finding documentation on this.

Any ideas?

+6
source share
1 answer

The difference between debug and release assemblies is, for example, you can get the log output from the debug assembly, but not from the release assembly.

Debug assemblies can be signed with the default keystore, release assemblies must be signed with the created keystore.

You can define buildTypes in your gradle application module. Here is an example:

release { shrinkResources true minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } debug { applicationIdSuffix ".debug" } 

You can also define different tastes, for example:

 productFlavors { pro { applicationId = "xx.xxx.xxx.pro" signingConfig signingConfigs.Pro } lite { applicationId = "xx.xxx.xxx.lite" signingConfig signingConfigs.Lite } } 

This system makes it easy to create different apks from one Codebase (free or paid version, etc.).

+11
source

Source: https://habr.com/ru/post/980763/


All Articles