gpt4 book ai didi

java - 泄漏了最初绑定(bind)在这里的 ServiceConnection

转载 作者:行者123 更新时间:2023-11-30 08:57:47 27 4
gpt4 key购买 nike

我打开一个应用程序做了一些事情,然后应用程序崩溃了。我再次打开它并收到此错误。我想知道这个错误的原因和解决方法。谁能帮忙。

   15 01:25:59.698  31122-31122/com.myApp.myApp E/ActivityThread﹕ Activity com.myApp.myApp.Main has leaked ServiceConnection com.google.android.gms.common.a@412XXfa8 that was originally bound here
android.app.ServiceConnectionLeaked: Activity com.myApp.myApp.Main has leaked ServiceConnection com.google.android.gms.common.a@412XXfa8 that was originally bound here
at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
at android.app.ContextImpl.bindService(ContextImpl.java:1470)
at android.app.ContextImpl.bindService(ContextImpl.java:1459)
at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
at com.google.android.gms.ads.identifier.AdvertisingIdClient.h(Unknown Source)
at com.google.android.gms.ads.identifier.AdvertisingIdClient.b(Unknown Source)
at com.google.android.gms.ads.identifier.AdvertisingIdClient.getAdvertisingIdInfo(Unknown Source)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.facebook.internal.Utility.invokeMethodQuietly(Utility.java:899)
at com.facebook.internal.AttributionIdentifiers.getAndroidId(AttributionIdentifiers.java:85)
at com.facebook.internal.AttributionIdentifiers.getAttributionIdentifiers(AttributionIdentifiers.java:110)
at com.facebook.AppEventsLogger.getSessionEventsState(AppEventsLogger.java:751)
at com.facebook.AppEventsLogger.access$600(AppEventsLogger.java:127)
at com.facebook.AppEventsLogger$5.run(AppEventsLogger.java:708)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:856)

最佳答案

在 onStop() 或 onDestroy() 中取消绑定(bind)您的服务连接

unBindService(connection);

关于java - 泄漏了最初绑定(bind)在这里的 ServiceConnection,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27951884/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com