我的应用程序在实际设备上运行正常,但是当我使用模拟器时,我收到泄漏的IntentReceiver
错误。
我没有使用任何广播接收器,我的清单中声明的唯一接收器是FirebaseInstanceIdReceiver
和其他一些我认为不需要注册的Firebase ID接收器。
感谢帮助
这是错误:
Service com.android.providers.media.MtpService has leaked IntentReceiver android.mtp.MtpDatabase$1@9399bf3 that was originally registered here. Are you missing a call to unregisterReceiver()?
android.app.IntentReceiverLeaked: Service com.android.providers.media.MtpService has leaked IntentReceiver android.mtp.MtpDatabase$1@9399bf3 that was originally registered here. Are you missing a call to unregisterReceiver()?
at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:922)
at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:723)
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1158)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1138)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1132)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:554)
at android.mtp.MtpDatabase.setServer(MtpDatabase.java:253)
at com.android.providers.media.MtpService.manageServiceLocked(MtpService.java:359)
at com.android.providers.media.MtpService.access$1700(MtpService.java:57)
at com.android.providers.media.MtpService$MtpMsgHandler.doStartMtpServer(MtpService.java:338)
at com.android.providers.media.MtpService$MtpMsgHandler.handleMessage(MtpService.java:272)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:224)
at android.os.HandlerThread.run(HandlerThread.java:61)