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相关的方法不可被混淆。混淆方法如下:
保证百度类不能被混淆,否则会出现网络不可用等运行时异常
# 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.**
No comments:
Post a Comment