Known issues

Android issues

  • For bundled Language ID, the app may crash when upgrading to AGP 7.0.0 or later. To avoid the crash in or earlier, include the rule below:
    -keep class { *; }
    To avoid the crash in or, include the rule below:
    -keep class { *; }
  • InputImage constructed by Bitmap with a non zero rotationDegrees causes an "invalid rotation" MlKitException for FaceDetection API since and Please use an earlier version and wait for our next release which includes the fix for this issue.
  • BarcodeScanning SDKs pior to and do not work on some devices running with camera-camera2:1.0.0-beta08 version or later. You can use an earlier version of camera-camera2 to bypass this issue. For example:

    implementation ""
    implementation ""
    implementation ""
    implementation ""
    implementation ""

  • Native methods might be obfuscated by custom rules in or earlier. Include the following rule to keep them if you encounter errors like java.lang.UnsatisfiedLinkError:

    -keepclasseswithmembernames class {
      native <methods>;

  • For the Text Recognition, Image Labeling, and Object Detection and Tracking APIs, the performance with CameraX and Camera2 is still not on par with Camera1, because it takes more time to do format conversion for image from CameraX and Camera2.

  • Task callbacks might execute after the Activity or Fragment in which they have been registered has been destroyed. This might lead to an exception if the callback tries to access a detector that has been closed in the meantime. If you are using ML Kit in an Activity, you can register an Activity-scoped listener, which is automatically removed when the Activity is stopped. If you are using ML Kit in a Fragment or other environment, you can provide a custom executor that shuts down execution when the Fragment is destroyed. See ScopedExecutor.Java in the Vision Quickstart for an example.

  • For Image Labeling with image formats other than Bitmap, bundled variant has better performance than "thin" variant that depends on Google Play Services.

  • For Digital Ink or earlier and Entity Extraction or earlier, you will get the following runtime exception if you set targetSdkVersion to 31 and run on 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.
    This issue is fixed in our more recent releases.

    If you prefer using older versions, you can either set targetSdkVersion to less than 31 or add the following to your build.gradle as a workaround.

    // For apps targeting Android S+, add the following
    constraints {
      implementation ''

iOS issues

  • Simulators on M1-based Mac are not supported.
  • 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.