Can you provide your actual code and the actual error?
variant.outputFile = ...
or
variant.setOutputFile(..)
should work.
Using variant.packageApplication should work as well.
We have a test app (in the samples, called "renamedApk") that does simply
this:
android.applicationVariants.all { variant ->
variant.outputFile = file("$project.buildDir/${variant.name}.apk")
}
On Tue, Jun 3, 2014 at 10:52 AM, Jean-Michel Cazaux <
[email protected]> wrote:
> Hi there,
> I am trying to achieve teh same thing (renaming the apk file), but it
> seems the sample code does not work anymore with a recent Android plugin...
>
> Both variant.packageApplication.outputFile and variant.outputFile are
> erroring out.
>
> Any pointers to get this working on the last android plugin version ?
> Has it been replaced by something else ?
>
> Many thanks in advance,
> JM
>
>
> Le jeudi 11 avril 2013 13:59:36 UTC+2, Stefan Hoth a écrit :
>
>> Hi again,
>>
>> I was trying to get the version number of the "installMyFlavorRelease"-build.
>> I was trying to modify the outputFile property in build variants but this
>> is read only.
>>
>> My prefered output format would be <projectname>-<flavor>-<version>-<build
>> type>.apk
>>
>> How can I do this?
>>
>> - Stefan
>>
> --
> 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.