Android studio 不断上传旧的apk 版本 [英] Android studio keep upload old apk version
问题描述
我最近开始在从 android studio 运行我的项目时遇到问题,从 android studio 上传到我的设备的 APK 不是更新的.
I have recently starting to have a problem to run my project from android studio , the APK uploaded to my device from the android studio is not the updated one .
我已经检查了输出库,它确实创建了新的 APK,但上传了旧的.
i have checked in the output library and it does create new APK but upload the old one .
在我尝试了很多事情之后,唯一有效的方法就是执行 Gradle
sync ,但是每次我想运行我的项目时,我都需要一次又一次地这样做......这件事快把我逼疯了!
after many things i have try'd the only thing works is to do Gradle
sync , but every time i want to run my project i need to do this again and again...this thing is driving me crazy !
如果相关,这是我的毕业证书:
this is my gradle if relevant :
dependencies {
classpath 'com.android.tools.build:gradle:1.+'
}
这是我的运行配置:
推荐答案
原因是build.gradle文件中的getDate方法:
the reason is the method getDate in the build.gradle file :
versionName "2.3_" + getDate()
versionName "2.3_" + getDate()
一旦 getDate() 被删除,问题就解决了.
once getDate() was removed problem solved .
这篇关于Android studio 不断上传旧的apk 版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!