SQLiteOpenHelper error
I read this http://developer.android.com/resources/tutorials/notepad/index.html and now try to create my own simple example. For simplification reasons I don't have my own Adapter Class. When I try this
SQLiteOpenHelper dbHelper = new SQLiteOpenHelper(this,"myDB.db3", null, 1);
in my applications onCreate method I see Ecplise telling me
Cannot instantiate the type SQLiteOpenHelper
I am not seeing what is basically different from the SDK tutorial (apart from that my call to the constructor is开发者_如何学C not wrapped in helper classes).
Thanks, A.
SQLiteOpenHelper is an abstract class, you should inherit from it in order to instantiate one.
public class MyOpenHelper extends SQLiteOpenHelper {
...
}
MyOpenHelper dbHelper = new MyOpenHelper(...);
精彩评论