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]才行.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM