googlesamples / android-vision

Deprecated: The Mobile Vision API is now a part of ML Kit: Check out this repo:
https://github.com/firebase/quickstart-android/tree/master/mlkit
Apache License 2.0
2.92k stars 1.73k forks source link

always get "libmobile_vision_face.so library load status: false" #344

Open corelmax opened 6 years ago

corelmax commented 6 years ago

I've created an application based on this example and found an issue while testing my application. it usually work on my testing devices but not on user's devices.

I've tried to google for the solution but nothing solved this.

Could anyone help?

Thank you, Big.

Tested on Android version: 6.0.1, 7.x, Google Play Service version: >= 12 Internet Connection: Yes

Trace:

...
04-24 19:59:54.082 26109-27099/com.beid W/DynamiteModule: Local module descriptor class for com.google.android.gms.vision.dynamite not found.
04-24 19:59:54.100 26109-27099/com.beid I/DynamiteModule: Considering local module com.google.android.gms.vision.dynamite:0 and remote module com.google.android.gms.vision.dynamite:1702
04-24 19:59:54.100 26109-27099/com.beid I/DynamiteModule: Selected remote version of com.google.android.gms.vision.dynamite, version >= 1702
04-24 19:59:54.113 26109-27099/com.beid I/Vision: Loading library libmobile_vision_face.so
04-24 19:59:54.113 26109-27099/com.beid I/Vision: libmobile_vision_face.so library load status: false
...

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="...">
...
    <uses-feature android:name="android.hardware.camera" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CAMERA" />
    <application android:name="....">
      ...
        <meta-data android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version"/>
        <meta-data
            android:name="com.google.android.gms.vision.DEPENDENCIES"
            android:value="ocr,face" />
      ...
    </application>

</manifest>

Build.gradle

dependencies {
    implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.android.support:design:26.1.0'
...
    implementation "com.google.android.gms:play-services-vision:15.0.0"
...
}
sawankumarbundelkhandi commented 6 years ago

I am facing the same issue. @corelmax Did you find any solution?

corelmax commented 6 years ago

@sawankumarbundelkhandi not yet. it would work if you have internet connection established and latest Google Play Service while installing. otherwise, your app should work properly util you meet the functionality which use any part of API, you'll face the warning dialog and lead you to update the Google Play Service. then, when you back to your app and meet the functionality again, the native library should be downloading in the background (you can see it by LogCat). this take few secs or might be hours or never done. if it's seems to never done, you have to meet Apps > Google Play Service and then Clear All Data (this will wipe out your login for PlayStore), back to your app and it should start downloading again.

There're solutions for different situations, but it's absolutely bad experience for your users.