संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Android Gradle प्लग इन 2.0.0 (अप्रैल 2016)
- डिपेंडेंसी:
- नया:
-
- यह बाइटकोड इंजेक्शन की सुविधा देता है. साथ ही, एम्युलेटर या किसी फ़िज़िकल डिवाइस पर चल रहे ऐप्लिकेशन में कोड और संसाधन से जुड़े अपडेट पुश करता है. इससे झटपट चलाएं की सुविधा चालू हो जाती है.
- ऐप्लिकेशन के बंद होने पर भी, इंक्रीमेंटल बिल्ड के लिए सहायता जोड़ी गई.
Android डीबग ब्रिज के ज़रिए कनेक्ट किए गए डिवाइस पर, इंक्रीमेंटल बदलावों को पुश करके, पूरे बिल्ड के समय को बेहतर बनाया जाता है.
-
maxProcessCount
जोड़ा गया है. इससे यह कंट्रोल किया जा सकेगा कि एक साथ कितनी वर्कर डेक्स प्रोसेस शुरू की जा सकती हैं. मॉड्यूल-लेवल की build.gradle
फ़ाइल में मौजूद यह कोड, एक साथ चलने वाली प्रोसेस की ज़्यादा से ज़्यादा संख्या को 4 पर सेट करता है:
Groovy
android {
...
dexOptions {
maxProcessCount = 4 // this is the default value
}
}
Kotlin
android {
...
dexOptions {
maxProcessCount = 4 // this is the default value
}
}
- हमने एक्सपेरिमेंट के तौर पर कोड श्रिंक करने वाला एक टूल जोड़ा है. इससे, Proguard के साथ काम न करने वाली डिपेंडेंसी को पहले से डेक्स करने और फिर से डेक्स करने की प्रोसेस को कम किया जा सकेगा. इससे आपके डीबग बिल्ड वैरिएंट की बिल्ड स्पीड बेहतर होती है. एक्सपेरिमेंट के तौर पर उपलब्ध श्रिंकर, ऑप्टिमाइज़ेशन और अस्पष्टता की सुविधा के साथ काम नहीं करता. इसलिए, आपको रिलीज़ बिल्ड के लिए Proguard को चालू करना चाहिए. अपनी डीबग बिल्ड के लिए, एक्सपेरिमेंटल श्रिंकर को चालू करने के लिए, मॉड्यूल-लेवल की
build.gradle
फ़ाइल में यह कोड जोड़ें:
Groovy
android {
...
buildTypes {
debug {
minifyEnabled true
useProguard false
}
release {
minifyEnabled true
useProguard true // this is a default setting
}
}
}
Kotlin
android {
...
buildTypes {
getByName("debug") {
minifyEnabled = true
useProguard = false
}
getByName("release") {
minifyEnabled = true
useProguard = true // this is a default setting
}
}
}
- संसाधन कम करने वाले टूल के लिए, लॉगिंग की सुविधा जोड़ी गई है. साथ ही, इसकी परफ़ॉर्मेंस को बेहतर बनाया गया है.
संसाधन कम करने वाला टूल, अब अपनी सभी कार्रवाइयों को
resources.txt
फ़ाइल में लॉग करता है. यह फ़ाइल, Proguard लॉग फ़ाइलों वाले फ़ोल्डर में ही मौजूद होती है.
- बदलाव:
-
- ठीक की गई समस्याएं:
-
- उस समस्या को ठीक किया गया है जिसकी वजह से टेस्ट और मुख्य बिल्ड कॉन्फ़िगरेशन, दोनों में डुप्लीकेट एएआर डिपेंडेंसी दिखती थीं.
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-08-30 (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-08-30 (UTC) को अपडेट किया गया."],[],[],null,["\u003cbr /\u003e\n\nAndroid Gradle Plugin 2.0.0 (April 2016)\n\n\u003cbr /\u003e\n\nDependencies:\nNew:\n:\n - Enables [Instant Run](/tools/building/building-studio#instant-run) by supporting bytecode injection, and pushing code and resource updates to a running app on the emulator or a physical device.\n - Added support for incremental builds, even when the app isn't running. Full build times are improved by pushing incremental changes through the [Android Debug Bridge](/tools/help/adb) to the connected device.\n - Added [`maxProcessCount`](https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.DexOptions.html#com.android.build.gradle.internal.dsl.DexOptions:maxProcessCount) to control how many worker dex processes can be spawned concurrently. The following code, in the module-level `build.gradle` file, sets the maximum number of concurrent processes to 4: \n\n Groovy \n\n ```groovy\n android {\n ...\n dexOptions {\n maxProcessCount = 4 // this is the default value\n }\n }\n ```\n\n Kotlin \n\n ```kotlin\n android {\n ...\n dexOptions {\n maxProcessCount = 4 // this is the default value\n }\n }\n ```\n - Added an experimental code shrinker to support pre-dexing and reduce re-dexing of dependencies, which are not supported with Proguard. This improves the build speed of your debug build variant. Because the experimental shrinker does not support optimization and obfuscation, you should enable Proguard for your release builds. To enable the experimental shrinker for your debug builds, add the following to your module-level `build.gradle` file: \n\n Groovy \n\n ```groovy\n android {\n ...\n buildTypes {\n debug {\n minifyEnabled true\n useProguard false\n }\n release {\n minifyEnabled true\n useProguard true // this is a default setting\n }\n }\n }\n ```\n\n Kotlin \n\n ```kotlin\n android {\n ...\n buildTypes {\n getByName(\"debug\") {\n minifyEnabled = true\n useProguard = false\n }\n getByName(\"release\") {\n minifyEnabled = true\n useProguard = true // this is a default setting\n }\n }\n }\n ```\n - Added logging support and improved performance for the resource shrinker. The resource shrinker now logs all of its operations into a `resources.txt` file located in the same folder as the Proguard log files.\n\nChanged behavior:\n:\n - When `minSdkVersion` is set to 18 or higher, APK signing uses SHA256.\n - DSA and ECDSA keys can now sign APK packages.\n **Note:** The [Android keystore](/training/articles/keystore) provider no\n longer supports [DSA keys on Android 6.0](/about/versions/marshmallow/android-6.0-changes#behavior-keystore) (API level 23) and higher.\n\n\nFixed issues:\n:\n - Fixed an issue that caused duplicate AAR dependencies in both the test and main build configurations."]]