Android studio multi-channel packaging, custom packaging APK name

Now, in order to promote products, applications will be released in multiple channel application markets. In order to count the data of different channels, it is necessary to indicate the channels in the application. If you modify them one by one, the packaging efficiency will be very low. As provides us with a simple method to package all channel packages at one time through multiple channels.

1. As 2. X multi-channel packaging

(1) Add node in androidmanifest

(2) Android of build.gradle of APP module

2. As 2. X custom packaging APK name

Finally, after packaging, APK is placed in the project app / build / outputs / APK folder. APK Name: version name_ Channel name.apk

3. As 3. X multi-channel packaging

(1) Add nodes in Android manifest (same as 2. X, no change)

(2) Android of build.gradle of APP module

Multi version packaging

Single version packaging

After as 3.0, grade adds the flavordimensions attribute to control multiple versions of code and resources. If it is missing, an error will be reported

4. As 3. X custom packaging APK name

Apk Name: version name_ Channel name.apk

The above is the comparison and difference between as 2. X and as 3. X multi-channel packaging and user-defined packaging APK names. You can choose the corresponding methods according to your own as version. I hope it will be helpful to you! If you have any questions, please leave me a message and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>