Android Studio + Gradle old apk is being uploaded to device if filename is changed -


inside build.gradle file have debug buildtype contains following:

 versionnamesuffix "-" + buildtime()  applicationvariants.all { variant ->                 if (!variant.buildtype.name.equals("debug")) return;                 def file = variant.outputfile                 variant.outputfile = new file(file.parent, file.name.replace("unaligned.apk", buildtime() + "-signed.apk"))             } 

now version name , file name changes work perfectly, planned. problem each time run project can deploy apk usb device, android studio doesn't take account newly created build. uploads older 1 build/apk folder. example, if build/apk folder contains build-2013-10-07-1.apk , build-2013-10-07-2.apk, first 1 uploaded, not 2nd. ideas why ? workarounds, etc. ?

just use date stamp instead of time stamp. there still problem inside android studio in after day passes, need gradle sync in order new build installed, instead of yesterday's build.


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -