How can we execute pre-database sqlite statements in Android?
I have created my own database layer. This layer will create the database and even the queries. It has a method that will create the table by providing the table name, column names and column types as parameters to it and the table will be generated without writing the full length query. So, to implement this I have created a test application and inside the onCreate
method I have used my method that is going to generate the CREATE TABLE
query and execute it. But as the database is not yet created it's throwing a NullPointerException.
So how can I fix this exception?