標籤:tor file input eth open post set dispatch ima
使用LitePal操作資料庫
問題:一點添加資料庫就直接報錯退出
03-25 22:10:14.595 7094-7094/? E/memtrack: Couldn‘t load memtrack module (No such file or directory)03-25 22:10:14.595 7094-7094/? E/android.os.Debug: failed to load memtrack module: -203-25 22:10:14.680 2245-2306/? E/InputDispatcher: channel ‘423a6bc8 com.example.litepaltest/com.example.litepaltest.MainActivity (server)‘ ~ Channel is unrecoverably broken and will be disposed!03-25 22:10:16.060 7114-7114/? E/cutils-trace: Error opening trace file: No such file or directory (2)03-25 22:10:16.420 7114-7114/? E/memtrack: Couldn‘t load memtrack module (No such file or directory)03-25 22:10:16.420 7114-7114/? E/android.os.Debug: failed to load memtrack module: -203-25 22:10:16.985 7128-7128/? E/dalvikvm: Could not find class ‘android.graphics.drawable.RippleDrawable‘, referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering
重新刪了assets,又重新建立了個assets檔案夾,添加入litepal.xml檔案,發現又居然成功了。
懷疑是如下的原因,注意觀察那個檔案夾的表徵圖顏色
發現assets這個檔案夾的表徵圖是有個黃色的,而其他普通檔案夾沒有,例如aa 。 所以建立檔案夾時不要起錯名
查看下他的建表語句。它建立了3個表,我們只看一個book表就行了。android_metadata表不用管,table_schema表示LitePal內部使用的,我們可以直接忽視
和我的Book對象一樣
教訓:將類添加到映射模型列表中,千萬不要出現空格,否則報錯!
安卓學習Day10