Open khosbayar-b opened 1 year ago
We see this too, though rarely, on Poco F5 devices running Android 13 with com.google.mlkit:barcode-scanning:17.2.0
I had the same problem on OPPO , Android 13.
Caused by:
5
java.lang.IllegalStateException:MlKitContext has not been initialized
6
com.google.android.gms.common.internal.Preconditions.checkState(com.google.android.gms:play-services-basement@@18.1.0:2)
7
com.google.mlkit.common.sdkinternal.MlKitContext.getInstance(com.google.mlkit:common@@18.7.0:1)
I am using these libraries:
implementation 'com.google.mlkit:barcode-scanning:17.1.0'
implementation 'com.google.mlkit:text-recognition:16.0.0-beta6'
implementation 'com.google.mlkit:text-recognition-chinese:16.0.0-beta6'
I just code in application.java MlKitContext.initializeIfNeeded(this);
Describe the bug A clear and concise description of what the bug is. We started seeing this rarely on some devices at the moment. It is weird that getting
MlKitContext has not been initialized
even though we are not manually initializing a context (neither disabled content-provider as well)If applicable, please include
code snippet
andsample input(image, video, text, etc)
Expected behavior A clear and concise description of what you expected to happen.
SDK Info:
com.google.mlkit:barcode-scanning:17.0.0
Smartphone: