Android-version unified management

Step 1: Create a project and add a gradle file in the same directory:


Step 2: Fill in the file content of xxx.gradle: Note that the name of the signature here cannot have a connector such as "-".


Step 3: Find the build.gradle file in the same directory and add the code apply from: "config.gradle"


Step 4: Find the build.gradle file in the app directory and modify the content of the current version number. The reference to the rootObject can be associated with the xxx.gradle file outside. Be sure to correspond to the version number settings one by one, otherwise there will be small pits ! !


Step 5: Just click Sync Now and the studio will import the library you added for you. It's that simple.

Notice:

1. Pay attention to single and double quotation marks;

2. In the xxx.gradle file, there cannot be a "-" connector;

3. Note that rootproject needs to be added.

Source: https://www.jianshu.com/p/94d060657525

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324848439&siteId=291194637