You cannot change the generated APK to be dynamic. When Studio syncs the project, it gets a model that indicates the APK location. If the APK location changes on subsequent builds, Studio will still be looking for the APK indicated in the model at the time of the sync.
The way you would do it is to make a copy of the APK with the name you want. You probably only want to do this on the build server with a post-build task or something, as it makes little sense during development. On Thu, Nov 6, 2014 at 8:10 AM, Tomáš Procházka <[email protected]> wrote: > Hi. > > I have modified build script which change name of result APK which contain > GIT commit hash number, so name of app is different after every commit or > update local copy. > Android Studio use gradle to build so I thought that it will be no problem. > But AS in some way cache result APK name and trying to deploy old one if > commit hash was changed. > It is necessary to synchronize gradle script after every GIT change. Why > this happen? > If AS run gradle script for every build/run it must know the name of > result file. > > -- > You received this message because you are subscribed to the Google Groups > "adt-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Xavier Ducrohet Android SDK Tech Lead Google Inc. http://developer.android.com | http://tools.android.com Please do not send me questions directly. Thanks! -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
