谷歌地图的ProGuard混淆在Eclipse后不加载 [英] Google maps aren't loaded after ProGuard Obfuscation in Eclipse
问题描述
我正在开发使用谷歌地图的应用程序。直到我导出签署应用程序包。经过code已被混淆的地图是不再加载的应用程序工作正常了。我是pretty新ProGuard的,我已经试过修改proguard.cfg但洙远远没有奏效。
这里有一些我已经尝试了不同的东西:
I am developing an app that uses google maps. The app works fine up until I Export the signed app package .After the code has been obfuscated the maps are no longer loaded. I am pretty new to ProGuard,I've tried modifying proguard.cfg but soo far nothing has worked. Here are some of the different things that i've tried:
-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
感谢
推荐答案
这是在地图API密钥最有可能的问题。您应该生成而导出应用程序,并在地图视图使用它用于签名的密钥。结果
它不可能混淆使用ProGuard会影响到地图渲染。
It is most likely issue with the Maps API Key. You should generate the Key with the signature used while exporting the app and use it in your map view.
Its unlikely that Obfuscation using ProGuard will affect the map rendering.
这篇关于谷歌地图的ProGuard混淆在Eclipse后不加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!