所以我得到了:
class name (com/example/user/timetable_test/setup/SetTable$PlaceholderFragment) does not match path (com/example/user/timetable_test/setup/setTable$PlaceholderFragment.class)
Run Code Online (Sandbox Code Playgroud)
我刚刚做了这个活动,我收到了这个错误.我可以看到这种情况有所不同,但我不知道如何解决这个问题.
顺便说一句,这应该是标签活动.
每次我单击按钮向表中添加项目时,应用程序崩溃,我收到此错误,logcat:
11-30 21:46:00.822 13943-13943/com.example.user.timetable_test E/SQLiteLog: (1) near "TABLESunday": syntax error
11-30 21:46:00.827 13943-13943/com.example.user.timetable_test D/AndroidRuntime: Shutting down VM
11-30 21:46:00.827 13943-13943/com.example.user.timetable_test E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.user.timetable_test, PID: 13943
android.database.sqlite.SQLiteException: near "TABLESunday": syntax error (code 1): , while compiling: CREATE TABLESunday(_session INTEGER PRIMARY KEY AUTOINCREMENT,_name TEXT,_length INTEGER);
#################################################################
Error Code : 1 (SQLITE_ERROR)
Caused By : SQL(query) error or missing database.
(near "TABLESunday": syntax error (code 1): , while compiling: CREATE TABLESunday(_session INTEGER PRIMARY KEY AUTOINCREMENT,_name TEXT,_length INTEGER);)
#################################################################
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native …Run Code Online (Sandbox Code Playgroud) 我正在尝试将数据保存到数据库中,但似乎没有运行 onCreate 方法。可能这可能是另一个问题,但 logcat
12-01 01:22:41.785 19724-19724/com.example.user.timetable_test E/SQLiteLog: (1) near "null": syntax error
12-01 01:22:41.795 19724-19724/com.example.user.timetable_test E/SQLiteDatabase: Error inserting _length=1 _name=Break
android.database.sqlite.SQLiteException: near "null": syntax error (code 1): , while compiling: INSERT INTO null(_length,_name) VALUES (?,?)
#################################################################
Error Code : 1 (SQLITE_ERROR)
Caused By : SQL(query) error or missing database.
(near "null": syntax error (code 1): , while compiling: INSERT INTO null(_length,_name) VALUES (?,?))
#################################################################
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1058)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:623)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:59)
at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1607) …Run Code Online (Sandbox Code Playgroud)