Reference configuration problem of unified management version number in Android studio

Mode 1:

Write in gradle.properties:

Use the rule, the string is used directly, and the shaping needs to be followed by as int

Mode 2:

Add the contents in buildscript {...} under the build.gradle file in the root directory:

Use the rule, the string needs to use "$", and the shaping is directly used

Mode 3:

Add the contents in Ext {...} under the build.gradle file in the root directory:

Using rules, the string needs to use "$rootproject." and the shaping directly uses rootproject. Ext can be added or not

Mode 4:

Create a. Gradle file in the project root directory, such as config.gradle. The contents of the file in config.gradle can be defined by yourself, as shown in the following example:

Use the rules and reference them in build.gradle first:

summary

The above is the reference configuration of unified management version number in Android studio introduced by Xiaobian. 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
分享
二维码
< <上一篇
下一篇>>