Introduction to several common Android multi-channel packaging tools

  After the Android project is developed, multi-channel packaging is an essential link. The principle is to add different logos to the Android package to distinguish the download sources of each channel, which is used to calculate various data of the App in different usage markets or channel cooperation.

  If a worker wants to do his job well, he must first sharpen his tools. When you encounter a situation where there are many distribution channels in a project, you need to consider how to package and launch it more efficiently. Therefore, it is important to choose a useful channel calculation tool before investing in the channel. Here are several commonly used platform packaging tools on the market. Developers can implement power packaging according to their own needs.

​ Introduction to several common Android multi-channel packaging tools

  1. Android Studio packaging APK

  Packaging with Android Studio is relatively troublesome, but it is also the most traditional method and can be used when it is not too troublesome and the project is not stressful.

  (1) Click on Bulid in Android Studio and select Generate Signed APK.

  (2) In the pop-up window, create the keystore and key. After creation, the newly created keystore and key will be automatically selected (skip if you already have a keystore), and then click "Create new..." button to create a keystore.

  (3) Select the existing keystore and key (skip this step after creating the keystore in (2)), click the "Choose existing..." button to find the keystore file, and then enter the Key store password Password of the selected keystore file, and finally click the "..." button after Key alias to select or create a key.

  (4) Click the "Next" button, select the save path, and click the "Finish" button to complete.

  2. Hbuilder packaged APK

  Hbuilder packaging is relatively simple. The advantage of cloud-native packaging is that DCloud has officially configured a native packaging environment. For front-end engineers who are not familiar with native development, cloud packaging can lower the threshold of use. However, it should be noted that the same account only has 5 free opportunities per day, which developers can use at their discretion.

  (1) First, go to the official website to download the Hbuilder software tool, and select the corresponding system version to download.

  (2) Download, unzip, and run the corresponding program.

  (3) After running, click New to create a new project, and then replace all the files in the packaged dist under the project, including css, img, js, project homepage, project settings on the mobile phone, etc. Just copy and paste. Then click "Release-Cloud Packaging".

  (4) Log in to your account, and then make changes and adjustments according to your own needs to complete the packaging.

Edit switch to center

Add a comment on the image, no more than 140 words (optional)

3. Xinstall channel package production

  This is the most recommended Android channel packaging method. Not only is the packaging process simple and fast, but even operations or product personnel can independently produce channel packages in batches. The official also provides detailed data reports. It is very suitable for projects that require large-scale outsourcing or have short-term online requirements.

  (1) Preparation stage

  First register Xinstall and follow the step-by-step guide in the console [Android Integration] or the official website document. It will take a few minutes to complete the Android SDK integration.

  Then upload the application's APK master package. (The integration work only needs to be done once, and the APK master package can be replaced when the version of the client is updated later)

  (2) Formal packaging

  Create a channel package under the [Android Channel Package] directory, click [Add Channel Package], enter the channel number, channel name, channel quantity, and then press OK to generate the channel.

  After creating the channel, click [Export Channel Package] in the operation bar to generate APK installation packages carrying channel information (export as many as needed). Isn't it very simple and straightforward?

  Put the channel package into the corresponding app store or cooperation scenario, and Xinstall will automatically count relevant data (you need to call the API to obtain the registration volume, and switch to the advanced version to count the effect points). You can view the installation and registration in the [Channel Package Report] , retention and other data.

  4. Meituan Walle Packaging

  Meituan Packaging is also a very efficient packaging tool in the industry. Once mastered, Android packaging will get twice the result with half the effort.

  (1) Configure root build.gradle

  buildscript{dependencies{classpath'com.mcxiaoke.packer-ng:plugin:2.0.1'}}

  (2) Configure App build.gradle

  apply plugin:'packer'dependencies{......implementation'com.mcxiaoke.packer-ng:helper:2.0.1'}

  (3) Plug-in configuration

  build{...packer{archiveNameFormat='${buildType}-v${versionName}-${channel}'//Define the output APK name archiveOutput=new File(project.rootProject.buildDir,"apks") //Set APK output directory channelFile=new File(project.rootDir,"channel.txt")//Add channel configuration file}}

  (4) Create a new channel configuration file channel.txt

  Create a new channel.txt file in the project root directory

  The content of the file is the name of the channel. Requirements: There must be one channel per line.

  (5) Compile and package

  Use Terminal command:

  gradlew clean apkRelease

Guess you like

Origin blog.csdn.net/z7657/article/details/127371508