The Android 16 Beta is now available.
Try it out today and let us know what you think!
12L SDK をセットアップする
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
12L API で開発してアプリをテストするには、12L SDK をセットアップする必要があります。このページの手順に沿って Android Studio で Android 12 SDK をセットアップし、12L でアプリをビルドして実行します。
Android Studio を入手する
12L SDK には、Android Studio の以前のバージョンと互換性のない変更が含まれています。12L SDK での開発エクスペリエンスを最適化するには、Android Studio Chipmunk | 2021.2.1 以上を使用してください。
Android Studio を入手する
SDK をインストールする
Android Studio で次の手順を実施することにより、12L SDK をインストールできます。
- [Tools] > [SDK Manager] をクリックし、[Show Package Details] をクリックします。
- [SDK Platforms] タブで [Android 12L ("Sv2")] セクションを開き、[Android SDK Platform 32] パッケージを選択します。
- [SDK Tools] タブで [Android SDK Build-Tools 34] セクションを開き、最新の
32.x.x
バージョンを選択します。
- [適用] > [OK] をクリックして、選択したパッケージをダウンロードしてインストールします。
アプリのビルド構成を更新する
12L API にアクセスして 12L に対するアプリの互換性をテストするには、モジュール レベルの build.gradle
ファイルまたは build.gradle.kts
ファイルを開き、次のように compileSdkVersion
と targetSdkVersion
を 12L の値で更新します。
Groovy
android {
compileSdkVersion "32"
defaultConfig {
targetSdkVersion "32"
}
}
Kotlin
android {
compileSdkVersion("32")
defaultConfig {
targetSdkVersion("32")
}
}
12L の機能や変更内容について詳しくは、12L の機能と変更点をご覧ください。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-27 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-27 UTC。"],[],[],null,["# Set up the 12L SDK\n\nTo develop with the 12L APIs and test your app, you need to set up the 12L SDK.\nFollow the instructions on this page to set up the Android 12 SDK in Android\nStudio and build and run your app on 12L.\n\nGet Android Studio\n------------------\n\nThe 12L SDK includes changes that are not compatible with some lower versions of\nAndroid Studio. For the best development experience with the 12L SDK, use\nAndroid Studio Chipmunk \\| 2021.2.1 or higher.\n\n[Get Android Studio](/studio)\n\nInstall the SDK\n---------------\n\nWithin Android Studio, you can install the 12L SDK as follows:\n\n1. Click **Tools \\\u003e SDK Manager** , then click **Show Package Details**.\n2. In the **SDK Platforms** tab, expand the **Android 12L (\"Sv2\")** section and select the **Android SDK Platform 32** package.\n3. In the **SDK Tools** tab, expand the **Android SDK Build-Tools 34** section and select the latest `32.x.x` version.\n4. Click **Apply \\\u003e OK** to download and install the selected packages.\n\nUpdate your app's build configuration\n-------------------------------------\n\nTo access 12L APIs and test your app's compatibility with 12L, open your\nmodule-level `build.gradle` or `build.gradle.kts` file, and update the\n`compileSdkVersion` and `targetSdkVersion` with values for 12L: \n\n### Groovy\n\n```groovy\nandroid {\n compileSdkVersion \"32\"\n\n defaultConfig {\n targetSdkVersion \"32\"\n }\n}\n```\n\n### Kotlin\n\n```kotlin\nandroid {\n compileSdkVersion(\"32\")\n\n defaultConfig {\n targetSdkVersion(\"32\")\n }\n}\n```\n\nTo learn more about the features and changes in 12L, see [12L features and\nchanges](/about/versions/12/12L/summary)."]]