前提
ML kitを用いて,Cloud VisonAPIをオンデバイスでつかうスタートアップ実行の際,Text Recognitionの実行時のみエラーが発生してしまう.
https://github.com/googlesamples/mlkit/tree/master/android/vision-quickstart
上記のサンプルかの,Visonを実行しています.
アプリの立ち上げと,一緒に作成されている顔認識のほうは正常に動作しますが,Text Recognitionのみ,以下のエラーが発生してしまいます.
どなたか,原因のわかる方ご教授していただきたいです.よろしくお願いします.
実現したいこと
エラーを解消し,Text Recognitionを行いたい
発生している問題・エラーメッセージ
Error loading module com.google.android.gms.vision.ocr optional module true: com.google.android.gms.dynamite.DynamiteModule$LoadingException: No acceptable module found. Local version is 0 and remote version is 0.
該当のソースコード
gradle(プロジェクト直下)
1// Top-level build file where you can add configuration options common to all sub-projects/modules. 2 3buildscript { 4 5 repositories { 6 maven { url rootProject.projectDir.getAbsolutePath() + '/libraries' } 7 google() 8 jcenter() 9 } 10 dependencies { 11 classpath 'com.android.tools.build:gradle:3.4.0' 12 // NOTE: Do not place your application dependencies here; they belong 13 // in the individual module build.gradle files 14 } 15} 16 17allprojects { 18 repositories { 19 maven { url rootProject.projectDir.getAbsolutePath() + '/libraries' } 20 google() 21 jcenter() 22 } 23} 24 25task clean(type: Delete) { 26 delete rootProject.buildDir 27} 28
gradle(アプリ直下)
1apply plugin: 'com.android.application' 2 3android { 4 compileSdkVersion 28 5 defaultConfig { 6 applicationId "com.google.codelab.mlkit" 7 minSdkVersion 19 8 targetSdkVersion 28 9 versionCode 1 10 versionName "1.0" 11 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 12 } 13 buildTypes { 14 release { 15 minifyEnabled false 16 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 } 18 } 19 packagingOptions { 20 exclude 'META-INF/androidx.exifinterface_exifinterface.version' 21 } 22} 23 24dependencies { 25 implementation fileTree(dir: 'libs', include: ['*.jar']) 26 implementation 'androidx.appcompat:appcompat:1.1.0' 27 implementation 'androidx.legacy:legacy-support-v4:1.0.0' 28 implementation 'androidx.exifinterface:exifinterface:1.2.0' 29 implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 30 testImplementation 'junit:junit:4.13' 31 androidTestImplementation 'androidx.test.ext:junit:1.1.1' 32 androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' 33 34 // Face features 35 implementation 'com.google.mlkit:face-detection:16.0.0' 36 37 // Text features 38 implementation 'com.google.android.gms:play-services-mlkit-text-recognition:16.0.0' 39}
試したこと
アップデートなど実行したが,改善しませんでした.
補足情報(FW/ツールのバージョンなど)
android studio上でエミュレータを起動して実行してます.
(Pixel 5 API30)
あなたの回答
tips
プレビュー