在Android的非法状态异常时,在数据库中插入数据 [英] illegal state exception in android when inserting data in database

查看:227
本文介绍了在Android的非法状态异常时,在数据库中插入数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我的应用程序创建了两个表的数据库。当我在1表中插入数据,然后后运行正常,当我将数据保存在第二个表则给出了异常的非法状态异常(数据库不能打开)。请给我的解决方案。

According to my application i create the database with two tables. when i inserting the data in 1 table then it runs correctly after that when i save data in the second table then it gives the exception of illegal state exception (database cannot be open). Please give me the solution.

推荐答案

您需要学习如何调试在Eclipse和如何使用的亚行 DDMS 工具。

You need to learn how to Debug in Eclipse and how to use the ADB and DDMS tools.

为了获得有关异常/力详情靠近你需要寻找Eclipse的一个观点叫的 logcat的(你会发现在的 DDMS 观点)那里,你会发现一个详细的追踪时,/什么,在哪一行是问题。

In order to get more details about an exception/force close you need to look for a view in Eclipse called Logcat(you will find in the DDMS perspective) there you will find a detailed traceback when/what and on what line is the issue.

有关这一点,你应该阅读有关Android的调试一个完整的文章使用Eclipse

For this you should read a complete article about Debugging in Android using Eclipse

这篇关于在Android的非法状态异常时,在数据库中插入数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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