Known issues

Android issues

  • Dynamic module delivery is currently not supported by ML Kit. ML Kit dependencies need to live in the base module of the app.
  • BarcodeScanning SDKs pior to com.google.mlkit:barcode-scanning:16.1.0 and com.google.android.gms:play-services-mlkit-barcode-scanning:16.1.3 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 "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"
    

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

    -keepclasseswithmembernames class com.google.mlkit.nl.languageid.internal.LanguageIdentificationJni {
      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.