博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Android--百度地图报错:at com.baidu.location.LocationClient.onStart(Unknown Source)
阅读量:2191 次
发布时间:2019-05-02

本文共 1283 字,大约阅读时间需要 4 分钟。

在使用百度地图定位的时候,报一个异常

Exception Ljava/lang/UnsatisfiedLinkError;   threadid=1: thread exiting with uncaught exception (group=0x410d19d8)    FATAL EXCEPTION: main    java.lang.ExceptionInInitializerError  at com.baidu.location.g.a(Unknown Source)  at com.baidu.location.f.int(Unknown Source)  at com.baidu.location.f.int(Unknown Source)  at com.baidu.location.f.if(Unknown Source)    at com.baidu.location.f$b.handleMessage(Unknown Source)  at android.os.Handler.dispatchMessage(Handler.java:99)    at android.os.Looper.loop(Looper.java:137)  at android.app.ActivityThread.main(ActivityThread.java:4439)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:511)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)  、  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)    at dalvik.system.NativeStart.main(Native Method)  Caused by: java.lang.UnsatisfiedLinkError: Couldn't load locSDK_2.4: findLibrary returned null    at java.lang.Runtime.loadLibrary(Runtime.java:365)  at java.lang.System.loadLibrary(System.java:535)  at com.baidu.location.Jni.
(Unknown Source)
解决办法:首先检查libs下是否缺少支持的.so文件,(我的已经存在)

继续检查,发现new LocationClient 这个的时候 需要用 getApplicationContext。 
问题解决。(用全局变量context)

转载地址:http://dwdub.baihongyu.com/

你可能感兴趣的文章
【LEETCODE】228-Summary Ranges
查看>>
【LEETCODE】27-Remove Element
查看>>
【LEETCODE】66-Plus One
查看>>
【LEETCODE】26-Remove Duplicates from Sorted Array
查看>>
【LEETCODE】118-Pascal's Triangle
查看>>
【LEETCODE】119-Pascal's Triangle II
查看>>
【LEETCODE】88-Merge Sorted Array
查看>>
【LEETCODE】19-Remove Nth Node From End of List
查看>>
【LEETCODE】125-Valid Palindrome
查看>>
【LEETCODE】28-Implement strStr()
查看>>
【LEETCODE】6-ZigZag Conversion
查看>>
【LEETCODE】8-String to Integer (atoi)
查看>>
【LEETCODE】14-Longest Common Prefix
查看>>
【LEETCODE】38-Count and Say
查看>>
【LEETCODE】278-First Bad Version
查看>>
【LEETCODE】303-Range Sum Query - Immutable
查看>>
【LEETCODE】21-Merge Two Sorted Lists
查看>>
【LEETCODE】231-Power of Two
查看>>
【LEETCODE】172-Factorial Trailing Zeroes
查看>>
【LEETCODE】112-Path Sum
查看>>