0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

google_mlkit_text_recognitionで日本語用言語パッケージを指定するとエラーが出るとき

Posted at

FlutterでTextRecognitionを使う際、pub.devの記載に従って日本語の言語パックを指定すると以下のエラーが出ました

java.lang.AbstractMethodError: abstract method "java.lang.String com.google.mlkit.vision.text.TextRecognizerOptionsInterface.getConfigLabel()"

環境

  • google_mlkit_text_recognition: 0.10.0
  • Flutter: 3.13.5
  • エミュレータ: Android Pixel5

解決

pub.devでは、Android用に言語パックを指定する際の例として以下のように記載されています

dependencies {
    implementation 'com.google.mlkit:text-recognition-japanese:16.0.0-beta6'
}

betaの記述を取り除けば問題なく動きました。

dependencies {
    implementation 'com.google.mlkit:text-recognition-japanese:16.0.0'
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?