2

このコードを実行すると、エラーが発生します。データベースを作成し、それを変更して学習しようとしています。このコードをチュートリアル コードからコピーしました。例では正常に動作していましたが、実行できませんでした。なぜそれが起こるのかについて、より多くの情報を提供できますか?

エラーは次のとおりです。

この行に複数のマーカー

- The type DatabaseHelper must implement the inherited abstract method SQLiteOpenHelper.onUpgrade(SQLiteDatabase, 
 int, int)
- The public type DatabaseHelper must be defined in its own file
- The type DatabaseHelper must implement the inherited abstract method SQLiteOpenHelper.onCreate(SQLiteDatabase)

私のコードは次のとおりです。

package com.example.eos;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DatabaseHelper extends SQLiteOpenHelper { //ERROR IS HERE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


     static final String dbName="demoDB";
     static final String employeeTable="Employees";
     static final String colID="EmployeeID";
     static final String colName="EmployeeName";
     static final String colAge="Age";
     static final String colDept="Dept";

     static final String deptTable="Dept";
     static final String colDeptID="DeptID";
     static final String colDeptName="DeptName";

     static final String viewEmps="ViewEmps";


    public DatabaseHelper(Context context)
    {
        super(context, dbName, null,33);
    }

}
4

0 に答える 0