Search code examples
androidflutteraar

How to set Flutter build android aar version?


when I use flutter build aar, it always build version 1.0, for example: flutter_release-1.0.aar. how could I update this version to flutter_release-2.0.aar?

version: 2.0.0+3

I change pubspec.yaml files version as above, it still useless.


Solution

  • you can do that in command:

    flutter build aar --build-number=2.0
    

    Incase you want to generate only release aar then try this

    flutter build aar --no-debug --no-profile --build-number=2.0
    

    for more info on this command try this

    flutter build aar -h