mitchhymel / local_notifications

No longer in development -Flutter plugin for creating notifications
BSD 2-Clause "Simplified" License
108 stars 14 forks source link

Crash in release mode on Android when minifyEnabled is set to true #20

Closed artur-ios-dev closed 6 years ago

artur-ios-dev commented 6 years ago

The app crashes when initializing and sending local notifications when it's built in release mode with the given configuration:

buildTypes {
        release {
            signingConfig signingConfigs.release

            minifyEnabled true
            useProguard true

            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        }
    }

proguard-rules.pro

#Flutter Wrapper
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.**  { *; }
-keep class io.flutter.util.**  { *; }
-keep class io.flutter.view.**  { *; }
-keep class io.flutter.**  { *; }
-keep class io.flutter.plugins.**  { *; }

Disabling minifyEnabled rule fixes the issue. So seems like something is cut out of .apk that is needed for this plugin to work.

If needed I can provide the crash log once it shows up in the google play console.

artur-ios-dev commented 6 years ago

https://github.com/MaikuB/flutter_local_notifications/issues/100