Sqliteopenhelper Error(8,8)

Asked

Viewed 25 times

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?

  • 1

    It is recommended to put code instead of images.

  • @Joãomartins edited

  • https://stackoverflow.com/questions/12015731/android-sqlite-example

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.