0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Flutterの新規アプリ作成時のAndroidビルドでつまづいたこと

0
Last updated at Posted at 2026-06-28

前置き

と言っても、毎度つまづいているような気もする……

まずは以下のwarningが出てビルドができなかった。

Warning: Flutter support for your project's Gradle version (8.7.0) will soon be dropped. Please upgrade your Gradle version to a version of at least 8.14.0 soon.

解決方法1

警告メッセージの通り、8.14.0に上げてみた

android/gradle/wrapper/gradle-wrapper.properties
- distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.0-bin.zip

更なるエラー

上記対応したら今度は明確にエラーが、、どうも今度はAndroid Gradle Plugin versionというものを上げないといけないらしい。

Error: Your project's Android Gradle Plugin version (Android Gradle Plugin version 8.4.2) is lower than Flutter's minimum supported version of Android Gradle Plugin version 8.6.0. Please upgrade your Android Gradle Plugin version.

解決方法2

実際どこ変更すればよいかは、ネットを検索するとcom.android.applicationのバージョンをあげればよさそう。でもgradleに対して、どのバージョンを指定して良いかがわからない……。
と検索進めていくと、以下の対応表に出会った。(何度か見てそう)
https://developer.android.com/build/releases/about-agp?hl=ja

これに従って、ファイルを2つ書き替え。

android/gradle/wrapper/gradle-wrapper.properties
- distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.0-all.zip
+ distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
android/settings.gradle
-     id "com.android.application" version "8.4.2" apply false
+     id "com.android.application" version "9.2.0" apply false

無事build成功♪

✓ Built build/app/outputs/bundle/release/app-release.aab (51.0MB)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?