Android 15 SDK をセットアップする
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Android 15 API でアプリを開発して Android 15 の動作変更でテストするには、Android 15 SDK のセットアップが必要です。このページの手順に沿って Android Studio で Android 15 SDK をセットアップし、Android 15 でアプリをビルドして実行します。
Android Studio を入手する
Android 15 SDK には、古いバージョンの Android Studio と互換性のない変更が含まれています。Android 15 SDK の開発エクスペリエンスを最適化するには、Android Studio Koala Feature Drop | 2024.1.2 以降を使用してください。
Android Studio を入手する
Android 15 を試す
Android 15 を完全にサポートする準備ができていなくても、デバッグ可能なアプリ、Android 15 デバイス(仮想デバイスを含む)、互換性フレームワークを使用して、アプリの互換性テストを実施できます。その場合、アプリを変更して SDK でコンパイルするか SDK をターゲットに設定する必要はありません。
アプリのビルド構成を更新する
Android 15 API にアクセスするには、アプリの build.gradle
または build.gradle.kts
ファイルを開き、次のように Android 15 の compileSdk
を更新します。
Groovy
android {
compileSdk = 35
}
Kotlin
android {
compileSdk = 35
}
Android Studio では、Android SDK Upgrade Assistant を使用して、動作の変更に関するコンテキスト情報を確認できます。Android 15 の新しいランタイム動作を有効にする準備ができたら、次のようにアプリの targetSdk
を更新します。
Groovy
android {
defaultConfig {
targetSdk = 35
}
}
Kotlin
android {
defaultConfig {
targetSdk = 35
}
}
SDK を手動でインストールする
Android Studio で次の手順を実施することにより、Android 15 SDK をインストールできます。
- [Tools] > [SDK Manager] をクリックし、[Show Package Details] をクリックします。
- [SDK Platforms] タブで [Android API 35] セクションを開き、[Android SDK Platform 35] パッケージを選択します。
- [SDK Tools] タブで [Android SDK Build-Tools 35] セクションを開き、最新の
35.x.x
バージョンを選択します。
- [OK] をクリックすると、SDK がインストールされます。
次のステップ
アプリに影響する可能性がある変更と、そのような変更をアプリでテストする方法については、以下のトピックをご覧ください。
Android 15 で利用できる新しい API と機能について詳しくは、Android 15 の機能をご覧ください。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-27 UTC。
[null,null,["最終更新日 2025-07-27 UTC。"],[],[],null,["# Set up the Android 15 SDK\n\nTo develop with Android 15 APIs and test your app with the Android 15 behavior\nchanges, you need to set up the Android 15 SDK. Follow the instructions on this\npage to set up the Android 15 SDK in Android Studio and build and run your app\non Android 15.\n\nGet Android Studio\n------------------\n\nThe Android 15 SDK includes changes that are not compatible with some lower\nversions of Android Studio. For the best development experience with the Android\n15 SDK, use Android Studio Koala Feature Drop \\| 2024.1.2 or higher.\n\n\u003cbr /\u003e\n\n[Get Android Studio](/studio)\n\nTry out Android 15\n------------------\n\nIf you aren't quite ready to fully support Android 15, you can still\nperform app compatibility testing by using a debuggable app, an Android 15\ndevice (including [virtual devices](/studio/run/managing-avds)), and the [compatibility framework](/about/versions/15/reference/compat-framework-changes),\nwithout changing your app to compile with or target the SDK.\n\nUpdate your app's build configuration\n-------------------------------------\n\n| **Warning:** If your project does not use Android Gradle plugin 8.6.1 or higher, first run the [Android Gradle plugin Upgrade Assistant](/r/tools/upgrade-assistant/agp-upgrade-assistant) to upgrade to at least AGP 8.6.1.\n\nTo access Android 15 APIs, open your app's `build.gradle` or `build.gradle.kts`\nfile and update the `compileSdk` for Android 15 as follows: \n\n### Groovy\n\n```groovy\nandroid {\n compileSdk = 35\n}\n```\n\n### Kotlin\n\n```kotlin\nandroid {\n compileSdk = 35\n}\n```\n\nAndroid Studio can provide contextual information about the\nbehavior changes through the\n[Android SDK Upgrade Assistant](/r/studio-ui/ide/android-sdk-upgrade-assistant).\nOnce you're ready to opt in to the new runtime behaviours for Android 15,\nupdate your app's `targetSdk` as follows: \n\n### Groovy\n\n```groovy\nandroid {\n defaultConfig {\n targetSdk = 35\n }\n}\n```\n\n### Kotlin\n\n```kotlin\nandroid {\n defaultConfig {\n targetSdk = 35\n }\n}\n```\n\nManually install the SDK\n------------------------\n\nWithin Android Studio, you can install the Android 15 SDK as follows:\n\n1. Click **Tools \\\u003e SDK Manager** , then click **Show Package Details**.\n2. In the **SDK Platforms tab** , expand the **Android API 35** section and select the **Android SDK Platform 35** package.\n3. In the **SDK Tools** tab, expand the **Android SDK Build-Tools 35** section and select the latest `35.x.x` version.\n4. Click **OK** to install the SDK.\n\nNext steps\n----------\n\nTo learn about the changes that might affect your app, and to learn how to test\nthese changes in your app, read the following topics:\n\n- [Behavior changes that affect all apps](/about/versions/15/behavior-changes-all)\n- [Behavior changes that affect only apps that target Android 15](/about/versions/15/behavior-changes-15)\n\nTo learn more about new APIs and features available in Android 15, read [Android\n15 features](/about/versions/15/features)."]]