Showing posts with label 百度地图. Show all posts
Showing posts with label 百度地图. Show all posts

Monday, March 14, 2016

Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(com.baidu.mapapi.b) that doesn't come with an

今天使用百度地图的时候,

Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(com.baidu.mapapi.b) that doesn't come with an
Error:associated EnclosingMethod attribute. This class was probably produced by a
Error:compiler that did not target the modern .class file format. The recommended
Error:solution is to recompile the class from source, using an up-to-date compiler
Error:and without specifying any "-target" type options. The consequence of ignoring
Error:this warning is that reflective operations on this class will incorrectly


How to resolve it?

这两天在兼容百度地图的问题!

所以,讲百度地图的jar 包更换了,我只是更换了Jar 包,但是没有做别的处理,然后我查看了百度地图官方的问题link:http://lbsyun.baidu.com/index.php?title=androidsdk/qa


解决方案:

原来是因为,更换了包之后,在 prograd.pro 代码混淆的时候,出现了问题,这样我们需要将自己的导入的jar也要配置一下的:
例如:

# BaiduLBS  you can see http://lbsyun.baidu.com/index.php?title=androidsdk/qa-libraryjars libs/baidumapapi_v3_5_0.jar
-keep class com.baidu.** { *; }
-keep class vi.com.gdi.bgl.android.**{*;}



You can try this:

集成地图SDK的应用,在打包混淆的时候,需要注意与地图SDK相关的方法不可被混淆。混淆方法如下:
-keep class com.baidu.** {*;}
-keep class vi.com.** {*;}    
-dontwarn com.baidu.**
保证百度类不能被混淆,否则会出现网络不可用等运行时异常


# BaiduLBS  you can see http://lbsyun.baidu.com/index.php?title=androidsdk/qa-libraryjars libs/baidumapapi_v3_5_0.jar
-keep class com.baidu.** { *; }
-keep class vi.com.** {*;}
-dontwarn com.baidu.**


Wednesday, December 9, 2015

baidu 地图 如何根据经纬度获取 地理位置信息?


http://api.map.baidu.com/geocoder/v2/?ak=E4805d16520de693a3fe707cdc962045&callback=renderReverse&location=39.983424,116.322987&output=json&pois=1


参考链接:

1  http://developer.baidu.com/map/index.php?title=webapi/guide/webservice-geocoding


遇到的问题:
2  http://bbs.lbsyun.baidu.com/forum.php?mod=viewthread&tid=42056