संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Android 12 के एपीआई के साथ डेवलप करने और Android 12 के काम करने के तरीके में हुए बदलावों के हिसाब से अपने ऐप्लिकेशन को टेस्ट करने के लिए, आपको Android 12 SDK टूल सेट अप करना होगा. Android Studio में Android 12 SDK टूल सेट अप करने और Android 12 पर अपना ऐप्लिकेशन बनाने और चलाने के लिए, इस पेज पर दिए गए निर्देशों का पालन करें.
Android Studio डाउनलोड करें
Android 12 SDK टूल में ऐसे बदलाव शामिल हैं जो Android Studio के कुछ पुराने वर्शन के साथ काम नहीं करते. Android 12 SDK टूल के साथ डेवलपमेंट का बेहतर अनुभव पाने के लिए, Android Studio Arctic Fox | 2020.3.1 या इसके बाद के वर्शन का इस्तेमाल करें.
Android Studio में, Android 12 SDK टूल को इस तरह इंस्टॉल किया जा सकता है:
टूल > एसडीके मैनेजर पर क्लिक करें. इसके बाद, पैकेज की जानकारी दिखाएं पर क्लिक करें.
एसडीके प्लैटफ़ॉर्म टैब में, Android 12.0 ("S") सेक्शन को बड़ा करें और Android SDK Platform 31 पैकेज चुनें.
SDK टूल टैब में, Android SDK Build-Tools 34 सेक्शन को बड़ा करें और 31.x.x का नया वर्शन चुनें.
चुने गए पैकेज डाउनलोड और इंस्टॉल करने के लिए, लागू करें > ठीक है पर क्लिक करें.
अपने ऐप्लिकेशन का बिल्ड कॉन्फ़िगरेशन अपडेट करना
Android 12 के एपीआई ऐक्सेस करने और यह जांचने के लिए कि आपका ऐप्लिकेशन Android 12 के साथ काम करता है या नहीं, अपनी मॉड्यूल-लेवल build.gradle या build.gradle.kts फ़ाइल खोलें. इसके बाद, compileSdkVersion और targetSdkVersion को Android 12 की वैल्यू पर अपडेट करें:
किन बदलावों से आप पर असर पड़ सकता है, इस बारे में जानने के लिए और अपने ऐप्लिकेशन में इन बदलावों की जांच करने का तरीका जानने के लिए, नीचे दिए गए विषयों को पढ़ें:
Android 12 में उपलब्ध नए एपीआई और सुविधाओं के बारे में ज़्यादा जानने के लिए, Android
12 की सुविधाएं लेख पढ़ें.
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया."],[],[],null,["# Set up the Android 12 SDK\n\nTo develop with Android 12 APIs and test your app with the Android 12 behavior\nchanges, you need to set up the Android 12 SDK. Follow the instructions on this\npage to set up the Android 12 SDK in Android Studio and build and run your app\non Android 12.\n\nGet Android Studio\n------------------\n\nThe Android 12 SDK includes changes that are not compatible with some lower\nversions of Android Studio. For the best development experience with the Android\n12 SDK, use Android Studio Arctic Fox \\| 2020.3.1 or higher.\n\n[Get Android Studio](/studio)\n\nInstall the SDK\n---------------\n\nWithin Android Studio, you can install the Android 12 SDK as follows:\n\n1. Click **Tools \\\u003e SDK Manager** , then click **Show Package Details**.\n2. In the **SDK Platforms** tab, expand the **Android 12.0 (\"S\")** section and select the **Android SDK Platform 31** package.\n3. In the **SDK Tools** tab, expand the **Android SDK Build-Tools 34** section and select the latest `31.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 Android 12 APIs and test your app's compatibility with Android 12,\nopen your module-level `build.gradle` or `build.gradle.kts` file, and update the\n`compileSdkVersion` and `targetSdkVersion` with values for Android 12: \n\n### Groovy\n\n```groovy\nandroid {\n compileSdkVersion 31\n\n defaultConfig {\n targetSdkVersion 31\n }\n}\n```\n\n### Kotlin\n\n```kotlin\nandroid {\n compileSdkVersion(31)\n\n defaultConfig {\n targetSdkVersion(31)\n }\n}\n```\n| **Note:** If you aren't quite ready to fully support Android 12, you can still perform app compatibility testing by using a debuggable app, an Android 12 device, and the [compatibility framework](/about/versions/12/reference/compat-framework-changes), without changing either your app's `compileSdkVersion` or `targetSdkVersion`.\n\nTo learn about which changes might affect you, and to learn how to test these\nchanges in your app, read the following topics:\n\n- [Behavior changes that affect all apps](/about/versions/12/behavior-changes-all)\n- [Behavior changes that affect only apps that target Android 12](/about/versions/12/behavior-changes-12)\n\nTo learn more about new APIs and features available in Android 12, read [Android\n12 features](/about/versions/12/features)."]]