700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > android本地gradle地址 android gradle本地路径不存在

android本地gradle地址 android gradle本地路径不存在

时间:2023-08-08 23:52:37

相关推荐

android本地gradle地址 android gradle本地路径不存在

当我每次运行我的应用程序时,versionName在Manifest文件中递增.

20389表示旧版本名称,20390表示递增编号.

项目建立成功,如BUILD SUCCESSFUL.但问题是为什么Android studio会缓存以前的apk版本.这是什么错误:

Target device: lge-nexus_5-061642fd00511249

Uploading file

local path: H:\customFolder\app\build\outputs\apk\MyAppName-0.6.200_20383-debug.apk

remote path: /data/local/tmp/com.example.app

Local path doesn’t exist.

当应用程序在设备上运行时你注意,android studio尝试安装20383版本的apk.这是错误的.谁能帮助我?我已经googeled并看到了这个link.

以下是我可以使用gradle脚本更改清单文件的方法:

def updateRevisionNumber () {//autoIncrement Version Name

def currentVersion = getVersionName();

def currentRevisionInManifest = currentVersion.substring(currentVersion.indexOf("_")+1);

def lastRevision = Integer.parseInt(currentRevisionInManifest) + 1;

println("currentRevisionInManifest: " + currentRevisionInManifest);

println("lastRevision: " + lastRevision);

def oldText = manifestFile.getText();

def changedText = oldText.replace(currentRevisionInManifest,lastRevision+"");

manifestFile.setText(changedText);}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。