Crashlytics Gradle प्लग इन v3 पर अपग्रेड करें
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Crashlytics Gradle प्लग इन का नया वर्शन, एक मेजर वर्शन (v3.0.0) है. साथ ही, यह SDK को आधुनिक बनाता है. इसके लिए, यह Gradle और Android Gradle प्लग इन के पुराने वर्शन के साथ काम नहीं करता. इसके अलावा, इस रिलीज़ में AGP v8.1+ से जुड़ी समस्याओं को ठीक किया गया है. साथ ही, नेटिव ऐप्लिकेशन और पसंद के मुताबिक बनाए गए बिल्ड के लिए, सहायता को बेहतर बनाया गया है.
ज़रूरी शर्तें
Crashlytics Gradle प्लगिन v3 के लिए, ये ज़रूरी शर्तें पूरी होनी चाहिए:
Android Gradle प्लग इन 8.1+
Android Studio के नए वर्शन पर, Android Gradle प्लग इन अपग्रेड असिस्टेंट का इस्तेमाल करके, इस प्लग इन को अपग्रेड करें.
Firebase का google-services
Gradle प्लगिन 4.4.1 या इसके बाद का वर्शन
इस प्लगिन को अपग्रेड करने के लिए, अपने प्रोजेक्ट की Gradle बिल्ड फ़ाइल में इसका नया वर्शन डालें. जैसे:
Kotlin
plugins {
id("com.android.application") version "8.1.4" apply false
id("com.google.gms.google-services") version "4.4.3" apply false
...
}
Groovy
plugins {
id 'com.android.application' version '8.1.4' apply false
id 'com.google.gms.google-services' version '4.4.3' apply false
...
}
Crashlytics एक्सटेंशन में हुए बदलाव
Crashlytics Gradle प्लगिन के तीसरे वर्शन में, Crashlytics एक्सटेंशन में ये बदलाव किए गए हैं:
defaultConfig
Android ब्लॉक से एक्सटेंशन हटा दिया गया है. इसके बजाय, आपको हर वैरिएंट को कॉन्फ़िगर करना चाहिए.
अब इस्तेमाल में नहीं रहे फ़ील्ड mappingFile
को हटा दिया गया है. इसके बजाय, अब मर्ज की गई मैपिंग फ़ाइल अपने-आप उपलब्ध कराई जाती है.
अब इस्तेमाल में नहीं रहे फ़ील्ड strippedNativeLibsDir
को हटा दिया गया है. इसके बजाय, आपको सभी नेटिव लाइब्रेरी के लिए unstrippedNativeLibsDir
का इस्तेमाल करना चाहिए.
unstrippedNativeLibsDir
फ़ील्ड को कुल वैल्यू के तौर पर दिखाने के लिए बदला गया है.
एक से ज़्यादा डायरेक्ट्री वाला उदाहरण देखें
buildTypes {
release {
configure<CrashlyticsExtension> {
nativeSymbolUploadEnabled = true
unstrippedNativeLibsDir = file("MY/NATIVE/LIBS")
}
}
productFlavors {
flavorDimensions += "feature"
create("basic") {
dimension = "feature"
// ...
}
create("featureX") {
dimension = "feature"
configure<CrashlyticsExtension> {
unstrippedNativeLibsDir = file("MY/FEATURE_X/LIBS")
}
}
}
}
uploadCrashlyticsSymbolFilesBasicRelease
टास्क सिर्फ़ MY/NATIVE/LIBS
में मौजूद सिंबल अपलोड करेगा. हालांकि, uploadCrashlyticsSymbolFilesFeatureXRelease
टास्क MY/NATIVE/LIBS
और MY/FEATURE_X/LIBS
, दोनों में मौजूद सिंबल अपलोड करेगा.
क्लोज़र फ़ील्ड symbolGenerator
को दो नए टॉप लेवल फ़ील्ड से बदल दिया गया है:
symbolGeneratorType
, एक स्ट्रिंग है. इसकी वैल्यू "breakpad"
(डिफ़ॉल्ट) या "csym"
में से कोई एक हो सकती है.
breakpadBinary
, यह स्थानीय dump_syms
बाइनरी ओवरराइड की फ़ाइल है.
एक्सटेंशन को अपग्रेड करने के तरीके का उदाहरण
Kotlin
पहले |
buildTypes {
release {
configure<CrashlyticsExtension> {
// ...
symbolGenerator(
closureOf<SymbolGenerator> {
symbolGeneratorType = "breakpad"
breakpadBinary = file("/PATH/TO/BREAKPAD/DUMP_SYMS")
}
)
}
}
}
|
अब v3 में उपलब्ध है |
buildTypes {
release {
configure<CrashlyticsExtension> {
// ...
symbolGeneratorType = "breakpad"
breakpadBinary = file("/PATH/TO/BREAKPAD/DUMP_SYMS")
}
}
}
|
Groovy
पहले |
buildTypes {
release {
firebaseCrashlytics {
// ...
symbolGenerator {
breakpad {
binary file("/PATH/TO/BREAKPAD/DUMP_SYMS")
}
}
}
}
}
|
अब v3 में उपलब्ध है |
buildTypes {
release {
firebaseCrashlytics {
// ...
symbolGeneratorType "breakpad"
breakpadBinary file("/PATH/TO/BREAKPAD/DUMP_SYMS")
}
}
}
|
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-08-08 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-08-08 (UTC) को अपडेट किया गया."],[],[],null,["\u003cbr /\u003e\n\nThe latest release of the Crashlytics Gradle plugin is a major\nversion (v3.0.0) and modernizes the SDK by dropping support for lower versions\nof Gradle and the Android Gradle plugin. Additionally, the changes in this\nrelease resolve issues with AGP v8.1+ and improve support for native apps and\ncustomized builds.\n\nMinimum requirements\n\nCrashlytics Gradle plugin v3 has the following minimum requirements:\n\n- Android Gradle plugin 8.1+ \n\n Upgrade this plugin using the\n [Android Gradle plugin Upgrade Assistant](https://developer.android.com/build/agp-upgrade-assistant)\n on the latest version of Android Studio.\n\n- Firebase's `google-services` Gradle plugin 4.4.1+ \n\n Upgrade this plugin by specifying the latest version in your project's Gradle\n build file, like so:\n\nKotlin \n\n```kotlin\nplugins {\n id(\"com.android.application\") version \"8.1.4\" apply false\n id(\"com.google.gms.google-services\") version \"4.4.3\" apply false\n ...\n}\n```\n\nGroovy \n\n```groovy\nplugins {\n id 'com.android.application' version '8.1.4' apply false\n id 'com.google.gms.google-services' version '4.4.3' apply false\n ...\n}\n```\n\nChanges to the Crashlytics extension\n\nWith v3 of the Crashlytics Gradle plugin, the Crashlytics extension has\nthe following breaking changes:\n\n- Removed the extension from the `defaultConfig` android block. Instead, you\n should configure each variant.\n\n- Removed the deprecated field `mappingFile`. Instead, the merged mapping file\n is now provided automatically.\n\n- Removed the deprecated field `strippedNativeLibsDir`. Instead, you should use\n `unstrippedNativeLibsDir` for all native libs.\n\n- Changed the field `unstrippedNativeLibsDir` to be cumulative.\n\n View an example with multiple directories\n\n \u003cbr /\u003e\n\n \u003cbr /\u003e\n\n ```kotlin\n buildTypes {\n release {\n configure\u003cCrashlyticsExtension\u003e {\n nativeSymbolUploadEnabled = true\n unstrippedNativeLibsDir = file(\"\u003cvar class=\"readonly\" translate=\"no\"\u003eMY/NATIVE/LIBS\u003c/var\u003e\")\n }\n }\n productFlavors {\n flavorDimensions += \"feature\"\n create(\"basic\") {\n dimension = \"feature\"\n // ...\n }\n create(\"featureX\") {\n dimension = \"feature\"\n configure\u003cCrashlyticsExtension\u003e {\n unstrippedNativeLibsDir = file(\"\u003cvar class=\"readonly\" translate=\"no\"\u003eMY/FEATURE_X/LIBS\u003c/var\u003e\")\n }\n }\n }\n }\n \n ```\n\n \u003cbr /\u003e\n\n The `uploadCrashlyticsSymbolFilesBasicRelease` task will only upload the\n symbols in \u003cvar class=\"readonly\" translate=\"no\"\u003eMY/NATIVE/LIBS\u003c/var\u003e,\n but `uploadCrashlyticsSymbolFilesFeatureXRelease` will upload symbols in\n both \u003cvar class=\"readonly\" translate=\"no\"\u003eMY/NATIVE/LIBS\u003c/var\u003e\n and \u003cvar class=\"readonly\" translate=\"no\"\u003eMY/FEATURE_X/LIBS\u003c/var\u003e.\n\n \u003cbr /\u003e\n\n- Replaced the closure field `symbolGenerator` with two new top level fields:\n\n - `symbolGeneratorType`, a String of either `\"breakpad\"` (default) or `\"csym\"`.\n - `breakpadBinary`, a File of a local `dump_syms` binary override.\n\nExample for how to upgrade the extension \n\nKotlin\n\n|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Before** | ```kotlin buildTypes { release { configure\u003cCrashlyticsExtension\u003e { // ... symbolGenerator( closureOf\u003cSymbolGenerator\u003e { symbolGeneratorType = \"breakpad\" breakpadBinary = file(\"\u003cvar translate=\"no\"\u003e/PATH/TO/BREAKPAD/DUMP_SYMS\u003c/var\u003e\") } ) } } } ``` |\n| **Now in v3** | ```kotlin buildTypes { release { configure\u003cCrashlyticsExtension\u003e { // ... symbolGeneratorType = \"breakpad\" breakpadBinary = file(\"\u003cvar translate=\"no\"\u003e/PATH/TO/BREAKPAD/DUMP_SYMS\u003c/var\u003e\") } } } ``` |\n\nGroovy\n\n|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Before** | ```groovy buildTypes { release { firebaseCrashlytics { // ... symbolGenerator { breakpad { binary file(\"\u003cvar translate=\"no\"\u003e/PATH/TO/BREAKPAD/DUMP_SYMS\u003c/var\u003e\") } } } } } ``` |\n| **Now in v3** | ```groovy buildTypes { release { firebaseCrashlytics { // ... symbolGeneratorType \"breakpad\" breakpadBinary file(\"\u003cvar translate=\"no\"\u003e/PATH/TO/BREAKPAD/DUMP_SYMS\u003c/var\u003e\") } } } ``` |"]]