gpt4 book ai didi

android - 应用程序崩溃,因为 "ServiceConnectionLeaked"

转载 作者:太空狗 更新时间:2023-10-29 14:56:28 26 4
gpt4 key购买 nike

我在我的应用程序中添加了几个按钮并再次运行它,但它在完成一次运行后崩溃了。我不确定是什么导致了它,但这是 Debug模式下的以下错误:

06-20 23:21:59.656    2323-2323/com.android.email E/ActivityThread﹕ Service com.android.email.service.EmailBroadcastProcessorService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@2ded40e8 that was originally bound here
android.app.ServiceConnectionLeaked: Service com.android.email.service.EmailBroadcastProcessorService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@2ded40e8 that was originally bound here
at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:1077)
at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:971)
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1774)
at android.app.ContextImpl.bindService(ContextImpl.java:1757)
at android.content.ContextWrapper.bindService(ContextWrapper.java:539)
at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:181)
at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:224)
at com.android.email.service.EmailServiceUtils.isServiceAvailable(EmailServiceUtils.java:160)
at com.android.email.provider.AccountReconciler.reconcileAccountsInternal(AccountReconciler.java:171)
at com.android.email.provider.AccountReconciler.reconcileAccounts(AccountReconciler.java:115)
at com.android.email.service.EmailBroadcastProcessorService.reconcileAndStartServices(EmailBroadcastProcessorService.java:305)
at com.android.email.service.EmailBroadcastProcessorService.onBootCompleted(EmailBroadcastProcessorService.java:295)
at com.android.email.service.EmailBroadcastProcessorService.onHandleIntent(EmailBroadcastProcessorService.java:130)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)

所以我点击了第一个LoadedApk(我没有修改)这是我看到的代码

        ServiceDispatcher(ServiceConnection conn,
Context context, Handler activityThread, int flags) {
mIServiceConnection = new InnerConnection(this);
mConnection = conn;
mContext = context;
mActivityThread = activityThread;
mLocation = new ServiceConnectionLeaked(null);
mLocation.fillInStackTrace();
mFlags = flags;
}

仔细阅读后,我怀疑这可能是内存问题,但我不太确定。在内存中,通常分配 ~22mb 和~1mb 空闲。

最佳答案

这可能是不在 list 中声明您的(您的 Activity 之一)activity.xml 对应类的原因之一。

<activity android:name=".ValidatorDemo">
</activity>




public class Validatordemo extends Activity{
.....
}

关于android - 应用程序崩溃,因为 "ServiceConnectionLeaked",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30961909/

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