Rahul Devanavar
Rahul Devanavar

Reputation: 4175

How to build aar in flutter

I am adding Flutter in the existing native app following this link . I tried flutter build aar getting the following error Could not find a subcommand named "aar" for "flutter build".

Logs;

[   +1 ms] FAILURE: Build failed with an exception.
[   +1 ms] * Where:
[        ] Script '/Users/apple/flutter/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 379
[        ] * What went wrong:
[        ] A problem occurred configuring root project 'android_generated'.
[        ] > A problem occurred configuring project ':flutter'.
[        ]    > Could not find method execute() for arguments [] on task ':flutter:buildPluginReleaseDeviceInfo' of type
FlutterPluginTask.
[        ] * Try:
[        ] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan
to get full insights.
[        ] * Get more help at https://help.gradle.org
[        ] BUILD FAILED in 587ms
[ +415 ms] Running Gradle task 'assembleAarRelease'... (completed in 1.1s)
[   +5 ms] "flutter aar" took 5,757ms.
Gradle task assembleAarRelease failed with exit code 1

Upvotes: 0

Views: 3354

Answers (1)

Ovidiu
Ovidiu

Reputation: 8712

flutter build aar was introduced in Flutter 1.8.3 and the current stable version is 1.7.8+hotfix.4. You would have to switch to the beta, dev or master branch by running eg. flutter channel beta.

Upvotes: 2

Related Questions