简体   繁体   English

由 java.lang.IllegalArgumentException 引起:MediaButtonReceiver 组件可能不为空

[英]Caused by java.lang.IllegalArgumentException: MediaButtonReceiver component may not be null

I came across some questions here but None of them solved my issue I have already added MEDIA_BUTTON intent filer in manifest我在这里遇到了一些问题,但都没有解决我的问题我已经在清单中添加了 MEDIA_BUTTON 意图文件管理器

<service android:name=".services.MediaPlayerService">
    <intent-filter>
        <action android:name="android.intent.action.MEDIA_BUTTON" />
    </intent-filter>
</service>

But still have this crash但仍然有这个崩溃

Caused by java.lang.IllegalArgumentException: MediaButtonReceiver component may not be null.
       at android.support.v4.media.session.MediaSessionCompat$MediaSessionImplBase.<init>(MediaSessionCompat.java:1825)
       at android.support.v4.media.session.MediaSessionCompat$MediaSessionImplApi18.<init>(MediaSessionCompat.java:2979)
       at android.support.v4.media.session.MediaSessionCompat$MediaSessionImplApi19.<init>(MediaSessionCompat.java:3062)
       at android.support.v4.media.session.MediaSessionCompat.<init>(MediaSessionCompat.java:400)
       at android.support.v4.media.session.MediaSessionCompat.<init>(MediaSessionCompat.java:346)
       at com.abc.abc.services.MediaPlayerService.initMediaSession(MediaPlayerService.java:686)
       at com.abc.abc.services.MediaPlayerService.onStartCommand(MediaPlayerService.java:202)
       at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2702)
       at android.app.ActivityThread.access$2100(ActivityThread.java:135)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1293)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5017)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
       at dalvik.system.NativeStart.main(NativeStart.java)

Thanks.谢谢。

MediaButtonReceiver seems not initialized... MediaButtonReceiver 似乎没有初始化...

like: MediaButtonReceiver buttReciver像:MediaButtonReceiver buttReciver

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 原因:java.lang.IllegalArgumentException:主机名不能为null - Caused by: java.lang.IllegalArgumentException: Host name may not be null 引起:java.lang.illegalArgumentException - Caused by: java.lang.illegalArgumentException 计时器计划由:java.lang.IllegalArgumentException - Timer schedule Caused by: java.lang.IllegalArgumentException 引起:java.lang.IllegalArgumentException:不是实体: - Caused by: java.lang.IllegalArgumentException: Not an entity: 由java.lang.IllegalArgumentException引起的指定为非null的参数为null - Parameter specified as non-null is null caused by java.lang.IllegalArgumentException Servlet:原因:java.lang.IllegalArgumentException:无法转换参数:null - servlet: Caused by: java.lang.IllegalArgumentException: Can't convert argument: null Google AppEngine TaskQueue throws引起:java.lang.IllegalArgumentException:无效的URL:null - Google AppEngine TaskQueue throws Caused by: java.lang.IllegalArgumentException: Invalid URL : null Spring自动装配:原因:java.lang.IllegalArgumentException:无法设置空的TableModel - Spring autowiring: Caused by: java.lang.IllegalArgumentException: Cannot set a null TableModel java.lang.IllegalArgumentException:input == null - java.lang.IllegalArgumentException: input == null java.lang.IllegalArgumentException:上下文不得为null - java.lang.IllegalArgumentException: Context must not be null
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM