gradle修改AndroidManifest.xml中的版本号

def VersionCode = "19"
ant.replaceregexp(file:"../Assets/Plugins/Android/AndroidManifest.xml", byline:true, match:'android:versionCode="[0-9]+"', replace:"android:versionCode="${VersionCode}"", encoding:"UTF-8")

 唯一注意的地方是match这个参数, 不知道为什么写成

match:'android:versionCode="d+"'  就不行, 非得老老实实地把d改成 [0-9]才行.

原文地址:https://www.cnblogs.com/canono/p/5758569.html