第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Android studio真機(jī)上測試時點(diǎn)擊“添加備忘錄”按鈕后閃退

Android studio真機(jī)上測試時點(diǎn)擊“添加備忘錄”按鈕后閃退

路卡利歐 2018-03-22 00:18:50
在真機(jī)上測試時一點(diǎn)“添加備忘錄”這個按鈕就閃退,想知道是什么原因,應(yīng)該怎樣解決。求大神不吝賜教,感謝!!貼一下創(chuàng)建數(shù)據(jù)庫的代碼的代碼:NotesDB.javapackage?com.example.datenote;?? ?? import?android.content.Context;?? import?android.database.sqlite.SQLiteDatabase;?? import?android.database.sqlite.SQLiteOpenHelper;?? import?android.util.Log;?? ?? public?class?NotesDB?extends?SQLiteOpenHelper?{?? ?? ????public?static?final?String?TABLE_NAME_NOTES?=?"note";?? ????public?static?final?String?COLUMN_NAME_ID?=?"_id";?? ????public?static?final?String?COLUMN_NAME_NOTE_CONTENT?=?"content";?? ????public?static?final?String?COLUMN_NAME_NOTE_DATE?=?"date";?? ?? ????public?NotesDB(Context?context)?{?? ????????super(context,?"note",?null,?1);?? ????????//?TODO?Auto-generated?constructor?stub?? ????}?? ?? ????@Override?? ????public?void?onCreate(SQLiteDatabase?db)?{?? ????????String?sql?=?"CREATE?TABLE?"?+?TABLE_NAME_NOTES?+?"("?+?COLUMN_NAME_ID?? ????????????????+?"?INTEGER?PRIMARY?KEY?AUTOINCREMENT,"?? ????????????????+?COLUMN_NAME_NOTE_CONTENT?+?"?TEXT?NOT?NULL?DEFAULT\"\","?? ????????????????+?COLUMN_NAME_NOTE_DATE?+?"?TEXT?NOT?NULL?DEFAULT\"\""?+?")";?? ????????Log.d("SQL",?sql);?? ????????db.execSQL(sql);?? //??????String?sql1="insert?into?"+TABLE_NAME_NOTES+"values("+"1,"+"'寫作業(yè)',"+"'晚上要寫作業(yè)的干活'"+")";?? //??????Log.d("SQL1",?sql1);?? //??????db.execSQL(sql1);?? //??????ContentValues?values=new?ContentValues();?? //??????values.put("id",1);?? //??????values.put("content","寫作業(yè)");?? //??????values.put("date",?"2013-1-2");?? //??????db.insert("note",?null,?values);?? ?? ????}?? ?? ????@Override?? ????public?void?onUpgrade(SQLiteDatabase?arg0,?int?arg1,?int?arg2)?{?? ????????//?TODO?Auto-generated?method?stub?? ?? ????}?? ?? }
查看完整描述

目前暫無任何回答

  • 0 回答
  • 0 關(guān)注
  • 1930 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號