Unsuported Android Plugin version: 3.6.1

gradle
android
#1

Can’t build Android Studio 3.6.1 projects

Description of the issue

Build fails when using Android Studio 3.6.1 and Android Gradle Plugin 3.6.1.
The error message also contains a typo ‘unsuported’ vs ‘unsupported’.

Anyway, which is the latest supported version? Where can I find this information?

Environment:

Agent version:	1.9.7
Start time:	2020-03-24T08:25:21Z
$ bitrise "run"
  ██████╗ ██╗████████╗██████╗ ██╗███████╗███████╗
  ██╔══██╗██║╚══██╔══╝██╔══██╗██║██╔════╝██╔════╝
  ██████╔╝██║   ██║   ██████╔╝██║███████╗█████╗
  ██╔══██╗██║   ██║   ██╔══██╗██║╚════██║██╔══╝
  ██████╔╝██║   ██║   ██║  ██║██║███████║███████╗
  ╚═════╝ ╚═╝   ╚═╝   ╚═╝  ╚═╝╚═╝╚══════╝╚══════╝
  version: 1.40.0

The workflow stops at step Flutter Build v0.12.0

Reproducibility

  • Just creating a new Android Studio 3.6.1 project and trying to build it with Bitrise.

Local reproduction

Local build works fine.

Build log

$ flutter "build" "apk" "--release"
You are building a fat APK that includes binaries for [REDACTED]-arm, [REDACTED]-arm64, [REDACTED]-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
    To generate an app bundle, run:
        flutter build appbundle --target-platform [REDACTED]-arm,[REDACTED]-arm64,[REDACTED]-x64
        Learn more on: https://developer.[REDACTED].com/guide/app-bundle
    To split the APKs per ABI, run:
        flutter build apk --target-platform [REDACTED]-arm,[REDACTED]-arm64,[REDACTED]-x64 --split-per-abi
        Learn more on:  https://developer.[REDACTED].com/studio/build/configure-apk-splits#configure-abi-split
Running Gradle task 'assembleRelease'...                          789.8s (!)
Unsuported Android Plugin version: 3.6.1.
Failed to build Android platform, error: exit status 1
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | flutter-build (exit code: 1)                                  | 47.2 min |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...thub.com/bitrise-steplib/bitrise-step-flutter-build/issues |
| Source: https://github.com/bitrise-steplib/bitrise-step-flutter-build        |
+---+---------------------------------------------------------------+----------+
0 Likes

#2

At the time of writing Flutter supports AGP up to 3.5.0: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/android/gradle_utils.dart#L228

0 Likes

#3

Thank you @koral for pointing me in the right direction!

0 Likes