2

I am developing an Android application where I get the following exception while writing to the database:

An exception occurred: android.database.sqlite.SQLiteException

But it doest say anything else(not even the stack trace).

In general I find it very difficult to debug android SDK exceptions.

Any suggestions/tips on how to debug while developing android applications?

  • I am using Eclipse to develop the application.
3
  • To get the stack trace, use adb logcat, DDMS, or the DDMS perspective in Eclipse, to examine LogCat. Commented Aug 22, 2010 at 11:56
  • Are you able to run the application within Eclipse in debug mode? Should be fairly straightforward then to get at least a stack trace. Can you elaborate a bit more on what the problem is so we can help you? Commented Aug 22, 2010 at 11:56
  • If you have SQLite Exception, your query doesn't run. Get the database and try out your query in a SQLite Manager on your desktop. Commented Aug 22, 2010 at 11:56

2 Answers 2

4

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

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.

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

alt text
(source: droidnova.com)

Sign up to request clarification or add additional context in comments.

Comments

0

Have a look at this question and answers, also Developer Android.

I reckon you first get your head around handling exceptions before tackling the SQLiteException.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.