알려진 문제
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Android 문제
- 번들 언어 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 { *; }
- rotationDegrees가 0이 아닌 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>;
}
텍스트 인식, 이미지 라벨 지정, 객체 감지 및 추적 API의 경우 CameraX 및 Camera2의 성능이 아직 Camera1과 비슷하지 않습니다. CameraX 및 Camera2의 이미지 형식 변환에 시간이 더 걸리기 때문입니다.
작업 콜백은 등록된 Activity 또는 Fragment가 소멸된 후에 실행될 수 있습니다. 이렇게 하면 콜백이 그동안 닫힌 감지기에 액세스하려고 하면 예외가 발생할 수 있습니다. Activity에서 ML Kit를 사용하는 경우 Activity가 중지될 때 자동으로 삭제되는 Activity 범위 리스너를 등록할 수 있습니다. Fragment 또는 다른 환경에서 ML Kit를 사용하는 경우 Fragment가 소멸될 때 실행을 종료하는 맞춤 실행자를 제공할 수 있습니다. 예시는 Vision 빠른 시작의 ScopedExecutor.Java
를 참고하세요.
비트맵 이외의 이미지 형식을 사용하는 이미지 라벨링의 경우 번들 버전이 Google Play 서비스에 종속된 '얇은' 버전보다 성능이 우수합니다.
디지털 잉크 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 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 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."]]