android.app.RemoteServiceException:startForeground的错误通知:java.lang.RuntimeException:服务通知的无效通道:null

时间:2018-05-20 12:13:23

标签: android notifications android-8.0-oreo

 05-20 17:25:42.825 7493-7493/com.xxxxxx.xxxxx E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.xxxxxx.xxxxx, PID: 7493
    android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: null
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1768)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6494)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
            05-20 17:25:42.826 7493-7493/com.xxxxxx.xxxxx E/UncaughtException: android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: null
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1768)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6494)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

0 个答案:

没有答案