Crashing in MI Redmi Device on initialization

0 votes
asked Jun 28, 2018 by diaz1111 (320 points)
edited Jun 29, 2018 by diaz1111

Hi i am using basic version of easy ar . When i am testing it on MI it crashes on .

The crash report is :-

java.lang.UnsatisfiedLinkError: dlopen failed: library "/data/app/com.dracula-1/lib/arm64/libEasyAR.so" not found
        at java.lang.Runtime.load0(Runtime.java:908)
        at java.lang.System.load(System.java:1537)
        at cn.easyar.engine.EasyAR.loadLibraries(EasyAR.java:229)
        at cn.easyar.engine.EasyAR.initializeInner(EasyAR.java:157)
        at cn.easyar.engine.EasyAR.initialize(EasyAR.java:134)
        at cn.easyar.Engine.initialize(Engine.java:9)
        at com.dracula.ScanActivity.onCreate(ScanActivity.java:84)
        at android.app.Activity.performCreate(Activity.java:6875)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2659)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2767)
        at android.app.ActivityThread.-wrap12(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1514)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:163)
        at android.app.ActivityThread.main(ActivityThread.java:6221)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)

 The device info is in the link  you can check it here https://ibb.co/fuxweo .  Please let us know about the crash and how do we fix it . It crashes on first line which is :-

if (!Engine.initialize(this, BuildConfig.EASY_LICENCE_KEY)) {
    Log.e("HelloAR", "Initialization Failed.");
}

Solution:-  Thanks to Albert52 for quick response . For all who faced the same issue i am providing the solution i have used . I have't tested it on other Devices but it  surly works on MI redmi 64bit architecture . Just update your build.gradle.

android {
    ....
    defaultConfig {
        ...........
        ndk {
            abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
        }
    }
}

 

1 Answer

+1 vote
answered Jun 28, 2018 by albert52 (31,850 points)
selected Jun 29, 2018 by diaz1111
 
Best answer

Q:ava.lang.UnsatisfiedLinkError: dlopen failed: library "/data/app/com.dracula-1/lib/arm64/libEasyAR.so" not found

A:

1)About lib

2)If your phone's CPU architecture is arm64-v8a, please refer to:

https://www.easyar.com/doc/EasyAR%20SDK/Getting%20Started/2.0/Platform-Requirements.html#about-android-arm64-v8a

Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.
...