🚂

Android Studio(Koala|2024.1.1pacth1)、ある日突然HelloWorldでビルドエラー!

に公開

まんまタイトル通りなんだけど、
新規アプリを作成するために"Hello World"プロジェクトを生成したら、ビルドエラーになるようになった。どういうこと?

結論

libs.versions.tomlのバージョンを戻す
→ ".gradle"フォルダを削除
 → ".idea"フォルダを削除
  → プロジェクト再読み込み
を実行すると動作した。

libs.versions.tomlの修正は下記の通り

libs.versions.toml
[versions]
agp = "8.5.1"
kotlin = "1.9.0"
- coreKtx = "1.16.0"
+ coreKtx = "1.10.1"
junit = "4.13.2"
- junitVersion = "1.2.1"
- espressoCore = "3.6.1"
- appcompat = "1.7.0"
- material = "1.12.0"
- activity = "1.10.1"
- constraintlayout = "2.2.1"
+ junitVersion = "1.1.5"
+ espressoCore = "3.5.1"
+ appcompat = "1.6.1"
+ material = "1.10.0"
+ activity = "1.8.0"
+ constraintlayout = "2.1.4"

[libraries]
.
.
.

Android コロコロ仕様変えすぎ。ホントに。
※".idea"フォルダは削除せんでもいいみたい。

Discussion