Search code examples
androidproguardopenstreetmapnutiteqmapsforge

Offline map freezes the app after proguard on android


I have an Android app using nutiteq OSM map, with mapsforge renderer, and a map file stored in the assets folder. It works perfectly without proguard, but after obfuscation, the app freezes, without any log info.

In the proguard.cfg:

-keep class com.nutiteq.** { ; } -keep class org.mapsforge.* { *; }

But even if I keep all code from my package, it doesn't help.

Any idea?

Thanks

Szoszi

UPDATE

Without irrelevant info.

proguard.cfg:

-printmapping proguard.map

-keepattributes SourceFile,LineNumberTable,*Annotation*,Signature

#-optimizationpasses 5
-dontpreverify

-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers

-libraryjars /libs/mapsforge-map-0.3.1-with-dependencies.jar
-libraryjars /libs/nineoldandroids-2.4.0.jar
-libraryjars /libs/nutiteq-3d-sdk-2.3.0.jar

-verbose

#Libraries
-keep class com.google.protobuf.** { *; }
-keep class com.nutiteq.** { *; }
-keep class org.mapsforge.** { *; }
-keep class mypackage.util.MapsforgeRasterDataSource.** { *; }

Solution

  • Finally, the solution had found. Proguard removes all logs from code, but nutiteq uses its own log methods...also removed. Everything works fine, if you keep logs.

    Thx for replies.