android - Why is my apk output versionCode not updating correctly? -


i'm trying minimize apps apk size splitting them abi. i'm using following guide doing that.

the problem i'm having versioncode not updating correctly on output apk. added printf test versioncode being computed , was.

any ideas help.

here gradle file. parts omitted..

apply plugin: 'com.android.application'  android {     compilesdkversion 22     buildtoolsversion "22.0.1"      defaultconfig {         applicationid "com.vblast.test"         minsdkversion 14         targetsdkversion 22         versioncode 41         versionname "1.4.7"     }      // special flavor dimensions different markets ,     // versions paid , free.     flavordimensions 'market', 'version'      productflavors {         google {             dimension 'market'         }         amazon {             dimension 'market'         }         mobiroo {             dimension 'market'         }         // base free version         free {             dimension 'version'         }         // base pro version         pro {             dimension 'version'         }     }      splits {         abi {             enable true             reset()             include 'x86', 'armeabi', 'armeabi-v7a' //, 'mips'             universalapk false         }     } }  // map version code ext.versioncodes = [armeabi:1, 'armeabi-v7a':2, x86:3, mips:4]  import com.android.build.outputfile  android.applicationvariants.all { variant ->     // assign different version code each output     variant.outputs.each { output ->         int abiversioncode = project.ext.versioncodes.get(output.getfilter(outputfile.abi))?:0         output.versioncodeoverride = (abiversioncode * 1000000) + android.defaultconfig.versioncode     } } 


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -