pushy / pushy-flutter

The official Pushy SDK for Flutter apps.
Apache License 2.0
21 stars 19 forks source link

Running on Release I got "No serializer found for class..." #32

Closed thiagoloureiro closed 3 years ago

thiagoloureiro commented 3 years ago

image

I/flutter ( 6534): Error: No serializer found for class c.a.a.e.c.a and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)
Application finished.

Tried with my local app and the example app from here.

(in debug mode works normally)

Device - Pixel 5

pushy commented 3 years ago

Hi @thiagoloureiro, Thanks for your report. Flutter comes preconfigured with ProGuard. Our Flutter docs mention the following instruction:

Please make sure the following lines are present in your android/app/proguard-rules.pro file (please create this file if it doesn't exist yet):

-dontwarn me.pushy.**
-keep class me.pushy.** { *; }
-keep class androidx.core.app.** { *; }
-keep class android.support.v4.app.** { *; }

Please add these lines to your proguard-rules.pro file, and run the app again. The error should be resolved.