Java Android应用程序在getWritableDatabase()上崩溃;

Java Android应用程序在getWritableDatabase()上崩溃;,java,android,database,sqlite,Java,Android,Database,Sqlite,每当我的应用程序到达SQLiteDatabase db=getwriteabledatabase()行,它崩溃时只告诉我:E/SQLiteLog:(1) 有什么问题吗?我尝试使用这个.getWriteableDatabase(),但也没有成功:( 清理和重建后运行日志 01-04 16:41:50.130 19496-19496/? I/art: Late-enabling -Xcheck:jni 01-04 16:41:50.264 19496-19496/com.example.h45495

每当我的应用程序到达
SQLiteDatabase db=getwriteabledatabase()addHistory()
方法中的code>行,它崩溃时只告诉我:E/SQLiteLog:(1)

有什么问题吗?我尝试使用
这个.getWriteableDatabase()
,但也没有成功:(

清理和重建后运行日志

01-04 16:41:50.130 19496-19496/? I/art: Late-enabling -Xcheck:jni
01-04 16:41:50.264 19496-19496/com.example.h454951.imtrying W/System: ClassLoader referenced unknown path: /data/app/com.example.h454951.imtrying-1/lib/arm64
01-04 16:41:50.269 19496-19496/com.example.h454951.imtrying I/InstantRun: Instant Run Runtime started. Android package is com.example.h454951.imtrying, real application class is null.
01-04 16:41:50.416 19496-19496/com.example.h454951.imtrying W/System: ClassLoader referenced unknown path: /data/app/com.example.h454951.imtrying-1/lib/arm64
01-04 16:41:50.562 19496-19496/com.example.h454951.imtrying I/HwCust: Constructor found for class android.app.HwCustHwWallpaperManagerImpl
01-04 16:41:50.632 19496-19496/com.example.h454951.imtrying W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
01-04 16:41:50.867 19496-19496/com.example.h454951.imtrying I/HwSecImmHelper: mSecurityInputMethodService is null
01-04 16:41:50.967 19496-19533/com.example.h454951.imtrying I/OpenGLRenderer: Initialized EGL, version 1.4
01-04 16:41:52.738 19496-19502/com.example.h454951.imtrying W/art: Suspending all threads took: 13.619ms
01-04 16:41:52.917 19496-19496/com.example.h454951.imtrying E/SQLiteLog: (1) 
01-04 16:41:52.947 19496-19496/com.example.h454951.imtrying I/Process: Sending signal. PID: 19496 SIG: 9

您在这里有一个额外的关闭参数

FIELD_TEMPERATURE + " FLOAT(3,2)), " +
移除它


请注意,sqlite根本不关心长度/精度修饰符,因此您可以完全删除
(3,2))

logcat在哪里?“它崩溃时只告诉我:E/SQLiteLog:(1)”--如果崩溃,LogCat中将有一个Java堆栈跟踪。发布您的崩溃日志,希望这是因为它似乎与即时运行有关。您是否尝试过完全清理和重建?问题仍然存在,但感谢您指出这个错误,并且sqlite不关心修改器!如果发生崩溃,您应该将stacktrace作为文本发布到您的问题中。
FIELD_TEMPERATURE + " FLOAT(3,2)), " +