API 34とGradle 8.1.0の組み合わせを使おうとしたら以下の警告が発生しました
We recommend using a newer Android Gradle plugin to use
compileSdk = 34
This Android Gradle plugin (8.1.0) was tested up to compileSdk = 33 (and compileSdkPreview = "UpsideDownCakePrivacySandbox").
You are strongly encouraged to update your project to use a newer
Android Gradle plugin that has been tested with compileSdk = 34.
If you are already using the latest version of the Android Gradle plugin,
you may need to wait until a newer version with support for compileSdk = 34 is available.
To suppress this warning, add/update
android.suppressUnsupportedCompileSdk=34
to this project's gradle.properties.
警告を抑止したい場合は警告の内容通りgradle.propertiesに以下を設定します
# Don't warn about needing to update AGP
android.suppressUnsupportedCompileSdk=34
※ 現時点でのGiraffeでの解決はできてなく確認した内容を残しています(Hedgehogで解決)
Gradleのリリースノートは以下ですがAPIレベルとの依存関係表のようなものは無いようです
https://developer.android.com/reference/tools/gradle-api
またAndroid SDKのリリースノートにも見当たりませんでした…
https://developer.android.com/studio/releases/platforms?hl=ja
というわけでα版ですがGradleのリリースノートにある最新の8.2.0-alpha15を指定しました
[versions]
agp = "8.2.0-alpha15"
リビルドすると以下のポップアップが表示されますのでSync projectを実行
以下のエラーが出るのでとりあえずGradleのバージョンも最新の8.3-rc-2にしてしまいます
The project is using an incompatible version (AGP 8.2.0-alpha15) of the Android Gradle plugin. Latest supported version is AGP 8.1.0
んー、だめっぽいのでエラーに出てるリンクを確認…
https://developer.android.com/studio/releases#android_gradle_plugin_and_android_studio_compatibility
えー…GiraffeのRequired AGP versionは3.2-8.1じゃん
Hedgehogで3.2-8.2とのことでした
というわけでまだcanary版ですがHedgehogで確認
Hedgehogの初期値はAPI Level 34 / Gradle 8.2.0-alpha15でした!
そしてwarningも出ないことが確認でしました
Android Studio Giraffe 2022.3.1 built on June 29, 2023