पहले से मालूम समस्याएं
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Android से जुड़ी समस्याएं
- बंडल किए गए Language ID के लिए, AGP 7.0.0 या इसके बाद के वर्शन पर अपग्रेड करने पर, ऐप्लिकेशन क्रैश हो सकता है.
com.google.mlkit:language-id:16.1.1
या उससे पहले के वर्शन में क्रैश होने से बचने के लिए, नीचे दिया गया नियम शामिल करें:
-keep class com.google.mlkit.nl.languageid.internal.LanguageIdentificationJni { *; }
com.google.mlkit:language-id:17.0.0
या com.google.mlkit:language-id:17.0.1
में क्रैश होने से बचने के लिए, नीचे दिया गया नियम शामिल करें:
-keep class com.google.mlkit.nl.languageid.internal.ThickLanguageIdentifier { *; }
- Bitmap से बनाई गई InputImage में, रोटेशन डिग्री शून्य के अलावा कोई और वैल्यू होने पर,
com.google.mlkit:face-detection:16.0.5
और com.google.android.gms:play-services-mlkit-barcode-scanning:16.1.4
के बाद से FaceDetection API के लिए "रोटेशन अमान्य है" वाला MlKitException दिखता है. कृपया किसी पुराने वर्शन का इस्तेमाल करें और हमारी अगली रिलीज़ का इंतज़ार करें. इसमें इस समस्या को ठीक करने का तरीका शामिल होगा.
com.google.mlkit:barcode-scanning:16.1.0
और com.google.android.gms:play-services-mlkit-barcode-scanning:16.1.3
से पहले के BarcodeScanning SDK टूल, camera-camera2:1.0.0-beta08 या उसके बाद के वर्शन पर काम नहीं करते.
इस समस्या को हल करने के लिए, camera-camera2 के पिछले वर्शन का इस्तेमाल किया जा सकता है. उदाहरण के लिए:
implementation "androidx.camera:camera-core:1.0.0-beta07"
implementation "androidx.camera:camera-camera2:1.0.0-beta07"
implementation "androidx.camera:camera-view:1.0.0-alpha14"
implementation "androidx.camera:camera-extensions:1.0.0-alpha14"
implementation "androidx.camera:camera-lifecycle:1.0.0-beta07"
com.google.mlkit:language-id:16.1.1
या उससे पहले के वर्शन में, कस्टम नियमों की वजह से नेटिव तरीकों को गच्चा दिया जा सकता है.
अगर आपको java.lang.UnsatisfiedLinkError
जैसी गड़बड़ियां मिलती हैं, तो उन्हें बनाए रखने के लिए यह नियम शामिल करें:
-keepclasseswithmembernames class com.google.mlkit.nl.languageid.internal.LanguageIdentificationJni {
native <methods>;
}
टेक्स्ट की पहचान करने, इमेज लेबल करने, ऑब्जेक्ट का पता लगाने, और ट्रैकिंग एपीआई के लिए, CameraX और Camera2 की परफ़ॉर्मेंस अब भी Camera1 के बराबर नहीं है. इसकी वजह यह है कि CameraX और Camera2 से इमेज के फ़ॉर्मैट को बदलने में ज़्यादा समय लगता है.
टास्क के कॉलबैक, उस ऐक्टिविटी या फ़्रैगमेंट के खत्म होने के बाद भी ट्रिगर हो सकते हैं जिसमें उन्हें रजिस्टर किया गया है. अगर कॉलबैक, इस दौरान बंद हो चुके डिटेक्टर को ऐक्सेस करने की कोशिश करता है, तो इससे अपवाद हो सकता है. अगर किसी गतिविधि में ML Kit का इस्तेमाल किया जा रहा है, तो गतिविधि के दायरे में आने वाला लिसनर रजिस्टर किया जा सकता है. यह गतिविधि बंद होने पर अपने-आप हट जाता है. अगर किसी फ़्रैगमेंट या दूसरे एनवायरमेंट में ML Kit का इस्तेमाल किया जा रहा है, तो आपके पास कस्टम एक्ज़ीक्यूटर उपलब्ध कराने का विकल्प होता है. यह एक्ज़ीक्यूटर, फ़्रैगमेंट के खत्म होने पर, प्रोसेस को बंद कर देता है. उदाहरण के लिए, विज़न क्विकस्टार्ट में ScopedExecutor.Java
देखें.
बिटमैप के अलावा किसी दूसरे इमेज फ़ॉर्मैट के साथ इमेज लेबल करने के लिए, बंडल किए गए वैरिएंट की परफ़ॉर्मेंस, Google Play Services पर निर्भर "थिन" वैरिएंट से बेहतर होती है.
डिजिटल इंक com.google.mlkit:digital-ink-recognition:17.0.0
या इससे पहले के वर्शन और इकाई निकालने की सुविधा com.google.mlkit:entity-extraction:16.0.0-beta2
या इससे पहले के वर्शन के लिए, targetSdkVersion
को 31 पर सेट करने और Android S पर चलाने पर, आपको यह रनटाइम अपवाद दिखेगा.
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE
or FLAG_MUTABLE
be specified when creating a PendingIntent
.
AndroidRuntime: Strongly consider using FLAG_IMMUTABLE
, only use FLAG_MUTABLE
if some functionality depends on the PendingIntent
being mutable, e.g. if it needs to be used with inline replies or bubbles.
हमने हाल ही में रिलीज़ किए गए वर्शन में इस समस्या को ठीक कर दिया है.
अगर आपको पुराने वर्शन इस्तेमाल करने हैं, तो targetSdkVersion
को 31 से कम पर सेट करें या समस्या को हल करने के लिए, build.gradle
में यह जोड़ें.
// For apps targeting Android S+, add the following
constraints {
implementation 'androidx.work:work-runtime:2.7.0-alpha04'
}
iOS से जुड़ी समस्याएं
- M1 प्रोसेसर वाले Mac पर सिम्युलेटर काम नहीं करते.
- X86_64 सिम्युलेटर पर, अनुवाद की सुविधा
'GoogleMLKit/Translate', '4.0.0'
या इसके बाद के वर्शन और स्मार्ट जवाब की सुविधा 'GoogleMLKit/SmartReply', '4.0.0'
या इसके बाद के वर्शन का इस्तेमाल नहीं किया जा सकता.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-08-29 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-08-29 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eUpgrading to AGP 7.0.0+ with bundled Language ID may cause crashes, requiring specific keep rules to be added for different versions.\u003c/p\u003e\n"],["\u003cp\u003eInputImage created with Bitmap and rotationDegrees may cause errors with FaceDetection API in specific versions; use earlier versions or await a fix.\u003c/p\u003e\n"],["\u003cp\u003eBarcodeScanning SDKs before 16.1.0/16.1.3 have compatibility issues with camera-camera2:1.0.0-beta08+, consider using earlier camera-camera2 versions.\u003c/p\u003e\n"],["\u003cp\u003eTask callbacks may execute after Activity/Fragment destruction, potentially causing exceptions; use Activity-scoped listeners or custom executors for mitigation.\u003c/p\u003e\n"],["\u003cp\u003eOn Android S with targetSdkVersion 31, Digital Ink and Entity Extraction SDKs before specific versions may cause runtime exceptions regarding PendingIntent flags; upgrade to newer SDKs or apply a workaround.\u003c/p\u003e\n"]]],["Key actions and information regarding Android issues include: adding specific `-keep` rules to avoid crashes when using Language ID with AGP 7.0.0 or later; using earlier versions of Face Detection and Barcode Scanning due to \"invalid rotation\" and camera compatibility issues; adding a rule to fix `UnsatisfiedLinkError` with Language ID. Performance with CameraX/Camera2 is not optimized for Text Recognition, Image Labeling, and Object Detection. Activity-scoped listeners can be registered to prevent exceptions with Task callbacks. Setting `targetSdkVersion` or adding constraints to address Digital Ink and Entity Extraction issues.\n"],null,["Android issues\n\n- For bundled Language ID, the app may crash when upgrading to AGP 7.0.0 or later. To avoid the crash in `com.google.mlkit:language-id:16.1.1` or earlier, include the rule below: \n\n ```scdoc\n -keep class com.google.mlkit.nl.languageid.internal.LanguageIdentificationJni { *; }\n ```\n To avoid the crash in `com.google.mlkit:language-id:17.0.0` or `com.google.mlkit:language-id:17.0.1`, include the rule below: \n\n ```scdoc\n -keep class com.google.mlkit.nl.languageid.internal.ThickLanguageIdentifier { *; }\n ```\n- InputImage constructed by Bitmap with a non zero rotationDegrees causes an \"invalid rotation\" MlKitException for FaceDetection API since `com.google.mlkit:face-detection:16.0.5` and `com.google.android.gms:play-services-mlkit-barcode-scanning:16.1.4`. Please use an earlier version and wait for our next release which includes the fix for this issue.\n- BarcodeScanning SDKs pior to `com.google.mlkit:barcode-scanning:16.1.0`\n and `com.google.android.gms:play-services-mlkit-barcode-scanning:16.1.3`\n do not work on some devices running with camera-camera2:1.0.0-beta08 version or later.\n You can use an earlier version of camera-camera2 to bypass this issue. For example:\n\n ```carbon\n implementation \"androidx.camera:camera-core:1.0.0-beta07\"\n implementation \"androidx.camera:camera-camera2:1.0.0-beta07\"\n implementation \"androidx.camera:camera-view:1.0.0-alpha14\"\n implementation \"androidx.camera:camera-extensions:1.0.0-alpha14\"\n implementation \"androidx.camera:camera-lifecycle:1.0.0-beta07\"\n ```\n\n \u003cbr /\u003e\n\n- Native methods might be obfuscated by custom rules in `com.google.mlkit:language-id:16.1.1` or earlier.\n Include the following rule to keep them if you encounter errors like `java.lang.UnsatisfiedLinkError`:\n\n ```text\n -keepclasseswithmembernames class com.google.mlkit.nl.languageid.internal.LanguageIdentificationJni {\n native \u003cmethods\u003e;\n }\n ```\n\n \u003cbr /\u003e\n\n- For the Text Recognition, Image Labeling, and Object Detection and\n Tracking APIs, the performance with CameraX and Camera2 is still not on par\n with Camera1, because it takes more time to do format conversion for image\n from CameraX and Camera2.\n\n- [Task](https://developers.google.com/android/guides/tasks)\n callbacks might execute after the Activity or Fragment in which they have been\n registered has been destroyed. This might lead to an exception if the callback\n tries to access a detector that has been closed in the meantime. If you are\n using ML Kit in an Activity, you can register an\n [Activity-scoped listener](https://developers.google.com/android/guides/tasks#activity-scoped_listeners),\n which is automatically removed when the Activity is stopped. If you are\n using ML Kit in a Fragment or other environment, you can provide a custom\n executor that shuts down execution when the Fragment is destroyed. See\n `ScopedExecutor.Java` in the [Vision Quickstart](https://github.com/googlesamples/mlkit/tree/master/android/vision-quickstart) for an\n example.\n\n- For Image Labeling with image formats other than Bitmap, bundled variant\n has better performance than \"thin\" variant that depends on Google Play Services.\n\n- For Digital Ink `com.google.mlkit:digital-ink-recognition:17.0.0` or earlier\n and Entity Extraction `com.google.mlkit:entity-extraction:16.0.0-beta2` or earlier,\n you will get the following runtime exception if you set `targetSdkVersion` to 31\n and run on Android S.\n\n Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.\n AndroidRuntime: Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.\n\n This issue is fixed in our more recent releases.\n\n \u003cbr /\u003e\n\n If you prefer using older versions, you can either set `targetSdkVersion` to\n less than 31 or add the following to your `build.gradle` as a workaround. \n\n ```carbon\n // For apps targeting Android S+, add the following\n constraints {\n implementation 'androidx.work:work-runtime:2.7.0-alpha04'\n }\n ```\n\n \u003cbr /\u003e\n\niOS issues\n\n- Simulators on M1-based Mac are not supported.\n- X86_64 simulator is not supported for Translation `'GoogleMLKit/Translate', '4.0.0'` or later and Smart Reply `'GoogleMLKit/SmartReply', '4.0.0'` or later."]]