getContentResolver查询原因CursorWrapperInner警告 [英] getContentResolver query cause CursorWrapperInner warning

查看:1140
本文介绍了getContentResolver查询原因CursorWrapperInner警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在4.0.3,原因如下警示code。W / CursorWrapperInner(11252):光标敲定,恕不另行关闭()

On 4.0.3, Code below cause warning "W/CursorWrapperInner(11252): Cursor finalized without prior close()".

    Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number));
    getContentResolver().query(uri, null, null, null, null);

在SORCE,我发现它从何而来,谁能告诉我如何避免,因为我怀疑它的警告涉及到一些奇怪的问题?

In sorce, I found the warning where it come from, anyone tell me how to avoid as i doubt it related to some weird problem?

推荐答案

我也遇到过这种奇怪的问题。我使用ContentProvider的给我提供一个游标和CursorLoader处理取我的片段/活动。所以,我做的一切这本书。

I have also experienced this weird issue. I'm using a ContentProvider to provide me with a Cursor and a CursorLoader to handle the fetching in my Fragment/Activities. So I'm doing everything "to the book".

我经历使用4.1.1设备此警告消息,但它似乎已经消失在我的Nexus 7是4.2。个人而言,我不会采取这样的警告的任何严重的通知。

I experienced this warning message using a 4.1.1 device, but it seems to have gone away on my Nexus 7 which is 4.2. Personally I would not take any serious notice of this warning.

更新: 我在测试我的code采用Android V2.2和我从这个错误中一个完整的堆栈跟踪。原来,我的code的取另一个光标(不是一个蹩脚使用一个Loader),这是这一点,是有问题的code。关闭此手工做的伎俩。

Update: I was testing my code with Android v2.2 and I got a full stacktrace from this error. It turned out that my code was fetching another Cursor (not the one fetched using a Loader) and it was this that was the offending code. Closing this manually did the trick.

这篇关于getContentResolver查询原因CursorWrapperInner警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆