google-maps-clustering icon indicating copy to clipboard operation
google-maps-clustering copied to clipboard

Crashes when minify/proguard/r8 is enabled

Open vitorhugods opened this issue 6 years ago • 0 comments

By using the ObjectAnimator when animating map markers, the variable name position gets obfuscated for release, crashing the app.

    private void animateMarkerToLocation(@NonNull final Marker marker, @NonNull LatLng targetLocation,
                                         final boolean removeAfter) {
        ObjectAnimator objectAnimator = ObjectAnimator.ofObject(marker, "position",
                new LatLngTypeEvaluator(), targetLocation);
        objectAnimator.setInterpolator(new FastOutSlowInInterpolator());

I don't know if just adding to the README is enough, or maybe preventing this by embedding proguard rules in the project.

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

vitorhugods avatar Aug 02 '19 08:08 vitorhugods