Не создается база данных, для этого даже логирую.
class DataBase extends SQLiteOpenHelper{
DataBase(Context context) {
super(context, "myDB", null, 1);
}
@Override
public void onCreate(SQLiteDatabase db) {
Log.d("myLog", "--- Create Data Base ---");
db.execSQL("create table mytable ("
+ "id integer primary key autoincrement,"
+ "value text"
+ ");");
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
}
}
public class MainActivity extends AppCompatActivity{
final String tag = "myLog";
DataBase dataBase;
SQLiteDatabase sqLiteDatabase;
ContentValues contentValues;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
Log.d(tag, "Создание Activity");
dataBase = new DataBase(this);
contentValues = new ContentValues();
}