android – Eclipse中的ProGuard Obfuscation后未加载Google地图

栏目: Android · 发布时间: 7年前

内容简介:它很可能是Maps API密钥的问题.您应该在导出应用程序时生成带有签名的密钥,并在地图视图中使用它.翻译自:https://stackoverflow.com/questions/9158373/google-maps-arent-loaded-after-proguard-obfuscation-in-eclipse

我正在开发一个使用谷歌地图的应用程序.应用程序工作正常,直到我导出已签名的应用程序包.代码被混淆后,不再加载地图.我对ProGuard很陌生,我试过修改proguard.cfg,但是没什么用了.

以下是我尝试过的一些不同的事情:

-libraryjars C:/Program Files/Android/android-sdk/add-ons/addon-google_apis-google_inc_-10/libs/maps.jar

-keep class android.location.** { *; }

-keepnames class com.google.android.maps.** {*;}
-keep public class com.google.android.maps.** {*;}

-dontwarn com.google.android.maps.GeoPoint
-dontwarn com.google.android.maps.MapActivity
-dontwarn com.google.android.maps.MapView
-dontwarn com.google.android.maps.MapController 
-dontwarn com.google.android.maps.Overlay

谢谢

它很可能是Maps API密钥的问题.您应该在导出应用程序时生成带有签名的密钥,并在地图视图中使用它.

翻译自:https://stackoverflow.com/questions/9158373/google-maps-arent-loaded-after-proguard-obfuscation-in-eclipse


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Approximation Algorithms

Approximation Algorithms

Vijay V. Vazirani / Springer / 2001-07-02 / USD 54.95

'This book covers the dominant theoretical approaches to the approximate solution of hard combinatorial optimization and enumeration problems. It contains elegant combinatorial theory, useful and inte......一起来看看 《Approximation Algorithms》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具