android "minifyEnabled true" 后未收到通知,为什么?

notification not received after "minifyEnabled true" in android, Why?

我的通知在 build.gradel 文件时收到 minifyEnabled 假, 但是每当我们更改 minifyEnabled true 通知时,我的签名版本 APK 中都没有收到。 这是我的 build.gradel 文件,

android {
    compileSdkVersion 28
defaultConfig {
    applicationId "com.abc.xyz.test"
    minSdkVersion 15
    targetSdkVersion 28
    versionCode 10
    versionName "1.0.8"
    multiDexEnabled true
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    signingConfig signingConfigs.brand_champs
}
lintOptions {
    disable 'GoogleAppIndexingWarning'
    warningsAsErrors true
    checkReleaseBuilds false
}
dexOptions {
    javaMaxHeapSize "4g"
}
buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
 'proguard-rules.pro'
        debuggable false
        jniDebuggable false
        renderscriptDebuggable false
        zipAlignEnabled false
    }
    debug {
        debuggable true
        zipAlignEnabled false
        jniDebuggable false
        minifyEnabled false
    }
 }

}

朋友解决了以上问题,

此问题与 class 迁移或未使用相关 class 在 proguard 启用时从代码中删除。

我们把keep规则写在proguard文件里,把通知相关的应用的my all模型都保留

-keepclassmembers class com.xyz.test.model.** {
 *;
}

这是我的class型号"com.xyz.test.model.**",你有什么不同class,根据你的id和包名