jgilfelt / chuck

An in-app HTTP inspector for Android OkHttp clients
Apache License 2.0
4.68k stars 452 forks source link

No Channel found - NotificationChannel issue in Android O #77

Closed lopspower closed 5 years ago

lopspower commented 5 years ago

I'm using version 1.1.0 and I'm compiling and target 27.

The issue on "NotificationChannel in Android O" does not seem to be fixed. I have the notifications on all devices but not above the API 25:

NotificationService: No Channel found for pkg=_PACKAGENAME, channelId=null, id=1138, tag=null, opPkg=_PACKAGENAME, callingUid=10089, userId=0, incomingUserId=0, notificationUid=10089, notification=Notification(channel=null pri=0 contentView=null vibrate=null sound=null defaults=0x0 flags=0x110 color=0xff00bcd4 actions=1 vis=PRIVATE)

lopspower commented 5 years ago

The bug finally came from proguard.

debug {
    minifyEnabled true
    useProguard false
    proguardFiles getDefaultProguardFile('proguard-android.txt'), ...
}

You must add the following rules: -keep class android.support.v4.app.NotificationCompat$* { *; }