获取日历应用程序时出错

发布于 2024-11-29 01:10:59 字数 277 浏览 3 评论 0原文

我正在关注以下链接 http://lovingandroid.blogspot.com/2011/08/retriving -events-from-calendar.html 但在 calCursor.moveToFirst(); 处出现异常 我正在模拟器上工作,这个问题的解决方案是什么???

I am following the following link
http://lovingandroid.blogspot.com/2011/08/retrieving-events-from-calendar.html
but getting exception at calCursor.moveToFirst();
I am working on emulator, What is solution of this???

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

那支青花 2024-12-06 01:11:00

你遇到了什么异常?是不是空指针异常?如果是,您可能需要在调用其 moveToFirst() 方法之前先检查 calCursor 是否不为 null。

What exception did you get? Is it a null pointer exception? If yes, you might need to check calCursor is not null first before invoking its moveToFirst() method.

寻找一个思念的角度 2024-12-06 01:10:59

也许您的光标没有数据

用途,例如

    if(calCursor.getCount()>0)
    calCursor.moveToFirst();

Maybe your cursor have no data

use like

    if(calCursor.getCount()>0)
    calCursor.moveToFirst();
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文