I\'m trying to create a table of statistics but for some reason, it doesn\'t create until I call StatisticsAdapter.insertEntry()
for the first time. After that, I c
Have you tried uninstalling the app before running the code? If the previous version of your code created db without statistics table, you have to increment your database version (DatabaseHelper.DATABASE_VERSION) to trigger onUpgrade call, which will create the table.
The second thing you can try is to extract table name into constant and using it instead hardcoded strings. Maybe you have a typo somewhere?
I'd also recommend pulling the database from device and checking its schema with command line sqlite client:
adb shell
busybox cp data/data/com.your.package/databases/database.db /sdcard
exit
adb pull /sdcard/database.db
sqlite3 database.db
.schema