
Android Studio 新規プロジェクト エラー
前提
Android Studio Jellyfish | 2023.3.1
Build #AI-233.14808.21.2331.11709847, built on April 13, 2024
Runtime version: 17.0.10+0--11572160 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
2025年になってから、テンプレート「Empty Views Activity template」で新規プロジェクトを作成してビルドすると次のようなエラーとなるようになりました。

エラーメッセージのテキストはこちら ↓
An issue was found when checking AAR metadata:
1. Dependency 'androidx.activity:activity:1.10.0' requires libraries and applications that
depend on it to compile against version 35 or later of the
Android APIs.
:app is currently compiled against android-34.
Also, the maximum recommended compile SDK version for Android Gradle
plugin 8.4.0 is 34.
Recommended action: Update this project's version of the Android Gradle
plugin to one that supports 35, then update this project to use
compileSdk of at least 35.
Note that updating a library or application's compileSdk (which
allows newer APIs to be used) can be done separately from updating
targetSdk (which opts the app in to new runtime behavior) and
minSdk (which determines which devices the app can be installed
on).
「プロジェクトフォルダ/app/build.gradle.kts」
プロジェクトフォルダ
├─.gradle
├─.idea
├─app
│ │ build.gradle.kts . . . . ★
│ │
│ ├─build
│ └─src
│ ├─androidTest
│ ├─main
│ │ ├─java
│ │ │ └─example
│ │ │ └─game1
│ │ └─res
│ └─test
└─gradle
の
compileSdk = 34
を
compileSdk = 35
とすることで解決します。そろそろ Android Studio アップデート時?
投げ銭用にてこれで終わりです。
ここから先は
0字
¥ 100
この記事が気に入ったらチップで応援してみませんか?