0
I’m starting to program in Android and want to make a class with a database.
package josephisaac.com.wmvendas;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
public class BancoDados extends SQLiteOpenHelper{
@Override
public void onCreate(SQLiteDatabase db){
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion){
}
}
When I type the above code into my Android Studio and run, it appears the following error:
Error:(8, 8) error: no suitable constructor found for SQLiteOpenHelper(no arguments) constructor SQLiteOpenHelper.SQLiteOpenHelper(Context,String,CursorFactory,int) is not applicable (actual and formal argument lists differ in length) constructor SQLiteOpenHelper.SQLiteOpenHelper (Context, String, CursorFactory, int, DatabaseErro Handler) is not applicable (actual and formal argument lists differ in length)
Could someone help me?
It is recommended to put code instead of images.
– João Martins
@Joãomartins edited
– Joseph Isaac
https://stackoverflow.com/questions/12015731/android-sqlite-example
– Reginaldo Rigo