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?

build.gradle.kts の jvmTarget の指定から Deprecated の警告が出ているのを対処したい

Posted at

概要

以下のように build.gradle に jvmTarget を設定していると Depcreated の警告が出ますが
今まで検索しても解決方法を見つけることができませんでした。

最近になってまともな解決方法がわかったのでここにメモしました。

スクリーンショット 2025-11-10 14.26.07.png

対処方法

「Android Studio Otter 2 Feature Drop | 2025.2.2」に更新して Gradle 9 にアップデートし、jvmTarget の指定を削除するだけ。

このバージョンは 2025/11/12 時点ではまだ Canary。

Gradle 9 より Kotlin が組み込まれるようになったため、Java の targetCompatibility に指定されたバージョンが使用されるようになり、jvmTarget を記載する必要がなくなったようです。

情報があまりなかった時代の対処法

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?