简体   繁体   中英

Android app that integrates Baidu Map Navigation failed on BaiduNaviManager init

To integrate Baidu Map Navigation into one of my Android apps, I followed the implementation in the Baidu Map Navigation officail demo. However, my app fails at BaiduNaviManager.getInstance().init . I checked Logcat and saw the exception pasted below:

10-29 17:56:12.793 13154 13154 W System.err: java.lang.reflect.InvocationTargetException
10-29 17:56:12.794 13154 13154 W System.err:    at java.lang.reflect.Method.invoke(Native Method)
10-29 17:56:12.794 13154 13154 W System.err:    at com.baidu.navisdk.adapter.base.BaiduNaviSDKProxy.init(BaiduNaviSDKProxy.java:128)
10-29 17:56:12.794 13154 13154 W System.err:    at com.baidu.navisdk.adapter.BaiduNaviManager.init(BaiduNaviManager.java:237)
10-29 17:56:12.794 13154 13154 W System.err:    at com.xxx.yyy.LocalMainActivity.initNavi(LocalMainActivity.java:768)
10-29 17:56:12.794 13154 13154 W System.err:    at com.xxx.yyy.LocalMainActivity.onCreate(LocalMainActivity.java:216)
10-29 17:56:12.794 13154 13154 W System.err:    at android.app.Activity.performCreate(Activity.java:6251)
10-29 17:56:12.794 13154 13154 W System.err:    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
10-29 17:56:12.794 13154 13154 W System.err:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
10-29 17:56:12.794 13154 13154 W System.err:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
10-29 17:56:12.794 13154 13154 W System.err:    at android.app.ActivityThread.-wrap11(ActivityThread.java)
10-29 17:56:12.794 13154 13154 W System.err:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
10-29 17:56:12.794 13154 13154 W System.err:    at android.os.Handler.dispatchMessage(Handler.java:102)
10-29 17:56:12.794 13154 13154 W System.err:    at android.os.Looper.loop(Looper.java:148)
10-29 17:56:12.794 13154 13154 W System.err:    at android.app.ActivityThread.main(ActivityThread.java:5417)
10-29 17:56:12.794 13154 13154 W System.err:    at java.lang.reflect.Method.invoke(Native Method)
10-29 17:56:12.794 13154 13154 W System.err:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-29 17:56:12.794 13154 13154 W System.err:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-29 17:56:12.794 13154 13154 W System.err: Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "/data/user/0/com.xxx.yyy/lib/libcrypto.so" not found
10-29 17:56:12.795 13154 13154 W System.err:    at java.lang.Runtime.load(Runtime.java:332)
10-29 17:56:12.795 13154 13154 W System.err:    at java.lang.System.load(System.java:1069)
10-29 17:56:12.795 13154 13154 W System.err:    at com.baidu.navisdk.adapter.impl.BaiduNaviManager.loadNativeLibrary(BaiduNaviManager.java:312)
10-29 17:56:12.797 13154 13154 W System.err:    at com.baidu.navisdk.adapter.impl.BaiduNaviManager.loadBaiduNaviNativeLibrary(BaiduNaviManager.java:294)
10-29 17:56:12.797 13154 13154 W System.err:    at com.baidu.navisdk.adapter.impl.BaiduNaviManager.init(BaiduNaviManager.java:694)
10-29 17:56:12.797 13154 13154 W System.err:    at com.baidu.navisdk.adapter.impl.BaiduNaviSDKStub.init(BaiduNaviSDKStub.java:399)

I followed Baidu's instruction, downloaded the Baidu LBS Android SDK, and added them into the app. The complained libcrypto.so is also in app\\src\\main\\jniLibs\\armeabi\\ . Other Baidu Map SDK such as Geolocation/Map works fine in my app. Not sure what the root cause is here.

我创建了一个后armeabi-v7a目录下jniLibs和复制相同的.so从文件armeabi ,这个问题也没有了。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM