0

I have a problem with the SQLiteHelper in android. I'm using a singleton class to control all the data base interactions, so it has a SQLite object. The problem is that when I create a new object of the SQLite, the method onCreate is not called and then, the data base is not initialized... I read that you have to instance a writter or reader to call that method, but I have already done it and it is not called...

What can it be?

Thanks...

0

1 Answer 1

1

If the db already exists from an earlier version, it won't call onCreate. Try uninstalling the app, which will delete the old db.

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

1 Comment

Or only delete the database file stackoverflow.com/questions/2161243/…

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.