调用时出现以下异常:requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
2089-2089/? E/ActivityThread﹕ Service com.android.email.service.EmailBroadcastProcessorService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@10bbc6d8 that was originally bound here
android.app.ServiceConnectionLeaked: Service com.android.email.service.EmailBroadcastProcessorService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@10bbc6d8 that was originally bound here`
我的onCreate方法看起来像这样:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
setContentView(R.layout.activity_movie_detail);
getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
}
我不知道从哪里开始。有人有想法么?
还要说明一下,删除
requestWindowFeature
行时不会发生该异常。 最佳答案
requestWindowFeature
本来应该:
supportRequestWindowFeature
尽管可能还有其他潜在问题,但我不明白为什么这是给出的错误。如果在其他地方使用appcompat主题时使用非支持方法代替支持方法,也会出现相同的错误
关于android - EmailBroadcastProcessorService泄漏了ServiceConnection,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/27778718/