akexorcist / GoogleDirectionLibrary

[Android] Library for Google Direction API for Google Maps Android API v2
Apache License 2.0
571 stars 174 forks source link

signed release app crashes in the direction fragment #47

Closed takmilul closed 4 years ago

takmilul commented 6 years ago

after creating a signed apk, when i click the direction button to show the direction in a fragment it shows error like onDirectionSuccess(unknown sources) but in debugging mode it works fine. please help me....

akexorcist commented 6 years ago

Did you added the ProGuard rules for this library?

ProGuard

-keep class com.google.android.gms.maps.** { *; }
-keep interface com.google.android.gms.maps.* { *; }

-dontwarn retrofit2.**
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions

-keepclasseswithmembers class * {
    @retrofit2.http.* <methods>;
}
MeenuBabu commented 4 years ago

For anyone who had stumbled across this issue, may have to add the below rule as well along with the mentioned proguard rules. -keep class com.akexorcist.googledirection.model.* { ;}

akexorcist commented 4 years ago

@MeenuBabu Thank you so much