我正在开发一个基于测验的应用程序,它有1个任务和4个选择。对于我在按钮上显示它们的选项,我想在单选按钮上显示这些选项。我在我的应用程序中使用了数据库。我做过类似的事情
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.akshara);
getShuffledArray();// for the random questions
Typeface tf = Typeface.createFromAsset(getBaseContext().getAssets(),
"fonts/tunga.ttf");
options[0] = (RadioButton) findViewById(R.id.radio1);
options[0].setOnClickListener(this);
options[0].setTypeface(tf);
options[1] = (RadioButton) findViewById(R.id.radio2);
options[1].setOnClickListener(this);
options[1].setTypeface(tf);
options[2] = (RadioButton) findViewById(R.id.radio3);
options[2].setOnClickListener(this);
options[2].setTypeface(tf);
options[3] = (RadioButton) findViewById(R.id.radio4);
options[3].setOnClickListener(this);
options[3].setTypeface(tf);
btn_next = (Button) findViewById(R.id.btn_next);
btn_next.setOnClickListener(this);
btn_bck = (Button) findViewById(R.id.btn_bck);
btn_bck.setOnClickListener(this);
getInfoFromDB(quizIndexList.get(counter));
reLoad();
}
private void reLoad() {
List<Integer> inList = new ArrayList<Integer>(Arrays.asList(0, 1, 2, 3));
Collections.shuffle(inList);
txtview = (TextView) findViewById(R.id.txt);
txtview.setText(optionsNames[4]);
Log.d("ERR", "List after shuffling: " + inList);
options[inList.get(0)].setText(optionsNames[0]);
options[inList.get(0)].setTag("right");
options[inList.get(1)].setText(optionsNames[1]);
options[inList.get(1)].setTag("wrong");
options[inList.get(2)].setText(optionsNames[2]);
options[inList.get(2)].setTag("wrong");
options[inList.get(3)].setText(optionsNames[3]);
options[inList.get(3)].setTag("wrong");
// TODO Auto-generated method stub
}
private void getShuffledArray() {
// TODO Auto-generated method stub
for (int i = 1; i <= SIZE; i++) {
quizIndexList.add(i);
}
Collections.shuffle(quizIndexList);
Log.d("ERR", "List A shuffling" + quizIndexList);
}
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
case R.id.radio1:
Log.d("ERR", v.getTag().toString());
if (v.getTag().toString().equalsIgnoreCase("right")) {
displayAnswer();
} else {
errorAnswer();
}
break;
case R.id.radio2:
Log.d("ERR", v.getTag().toString());
if (v.getTag().toString().equalsIgnoreCase("right")) {
displayAnswer();
} else {
errorAnswer();
}
break;
case R.id.radio3:
Log.d("ERR", v.getTag().toString());
if (v.getTag().toString().equalsIgnoreCase("right")) {
displayAnswer();
} else {
errorAnswer();
}
break;
case R.id.radio4:
Log.d("ERR", v.getTag().toString());
if (v.getTag().toString().equalsIgnoreCase("right")) {
displayAnswer();
} else {
errorAnswer();
}
break;
case R.id.btn_next:
// lyt_ans.setVisibility(View.GONE);
// lyt_quest.setVisibility(View.VISIBLE);
prev = counter;
counter += 1;
if (counter >= SIZE) {
Collections.shuffle(quizIndexList);
counter = 0;
}
getInfoFromDB(quizIndexList.get(counter));
reLoad();
break;
case R.id.btn_bck:
getInfoFromDB(quizIndexList.get(prev));
reLoad();
// counter --;
}
}
但该应用程序正在关闭。哪里出错了。可以帮我一个人。谢谢你。
04-13 11:43:19.928: DEBUG/AndroidRuntime(12149): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
04-13 11:43:19.928: DEBUG/AndroidRuntime(12149): CheckJNI is ON
04-13 11:43:20.518: DEBUG/AndroidRuntime(12149): --- registering native functions ---
04-13 11:43:21.867: DEBUG/AndroidRuntime(12149): Shutting down VM
04-13 11:43:21.878: DEBUG/dalvikvm(12149): Debugger has detached; object registry had 1 entries
04-13 11:43:21.918: INFO/AndroidRuntime(12149): NOTE: attach of thread 'Binder Thread #3' failed
04-13 11:43:22.798: DEBUG/AndroidRuntime(12175): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
04-13 11:43:22.798: DEBUG/AndroidRuntime(12175): CheckJNI is ON
04-13 11:43:23.088: DEBUG/AndroidRuntime(12175): --- registering native functions ---
04-13 11:43:24.208: INFO/ActivityManager(42): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.android.akshara/.MyActivity }
04-13 11:43:24.241: DEBUG/AndroidRuntime(12175): Shutting down VM
04-13 11:43:24.248: DEBUG/dalvikvm(12175): Debugger has detached; object registry had 1 entries
04-13 11:43:24.308: INFO/AndroidRuntime(12175): NOTE: attach of thread 'Binder Thread #3' failed
04-13 11:43:30.807: INFO/ActivityManager(42): Start proc com.android.settings for broadcast com.android.settings/.widget.SettingsAppWidgetProvider: pid=12214 uid=1000 gids={3002, 3001, 3003}
04-13 11:43:30.817: INFO/ActivityManager(42): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.android.launcher/com.android.launcher2.Launcher }
04-13 11:43:31.027: WARN/InputManagerService(42): Ignoring hideSoftInput of: com.android.internal.view.IInputMethodClient$Stub$Proxy@43ff0190
04-13 11:43:37.377: DEBUG/dalvikvm(11795): GC_EXPLICIT freed 1652 objects / 112968 bytes in 180ms
04-13 11:43:37.397: ERROR/Database(11795): close() was never explicitly called on database '/data/data/com.android.akshara/databases/akshara.db'
04-13 11:43:37.397: ERROR/Database(11795): android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here
04-13 11:43:37.397: ERROR/Database(11795): at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1810)
04-13 11:43:37.397: ERROR/Database(11795): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:817)
04-13 11:43:37.397: ERROR/Database(11795): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:851)
04-13 11:43:37.397: ERROR/Database(11795): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:844)
04-13 11:43:37.397: ERROR/Database(11795): at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:540)
04-13 11:43:37.397: ERROR/Database(11795): at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:203)
04-13 11:43:37.397: ERROR/Database(11795): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:98)
04-13 11:43:37.397: ERROR/Database(11795): at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:158)
04-13 11:43:37.397: ERROR/Database(11795): at com.android.akshara.Dbhelper.createDataBase(Dbhelper.java:42)
04-13 11:43:37.397: ERROR/Database(11795): at com.android.akshara.MyActivity.setupDatabase(MyActivity.java:70)
04-13 11:43:37.397: ERROR/Database(11795): at com.android.akshara.MyActivity.onCreate(MyActivity.java:24)
04-13 11:43:37.397: ERROR/Database(11795): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-13 11:43:37.397: ERROR/Database(11795): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
04-13 11:43:37.397: ERROR/Database(11795): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-13 11:43:37.397: ERROR/Database(11795): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
04-13 11:43:37.397: ERROR/Database(11795): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-13 11:43:37.397: ERROR/Database(11795): at android.os.Handler.dispatchMessage(Handler.java:99)
04-13 11:43:37.397: ERROR/Database(11795): at android.os.Looper.loop(Looper.java:123)
04-13 11:43:37.397: ERROR/Database(11795): at android.app.ActivityThread.main(ActivityThread.java:4627)
04-13 11:43:37.397: ERROR/Database(11795): at java.lang.reflect.Method.invokeNative(Native Method)
04-13 11:43:37.397: ERROR/Database(11795): at java.lang.reflect.Method.invoke(Method.java:521)
04-13 11:43:37.397: ERROR/Database(11795): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-13 11:43:37.397: ERROR/Database(11795): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
04-13 11:43:37.397: ERROR/Database(11795): at dalvik.system.NativeStart.main(Native Method)
04-13 11:44:12.517: DEBUG/SntpClient(42): request time failed: java.net.SocketException: Address family not supported by protocol
04-13 11:49:12.530: DEBUG/SntpClient(42): request time failed: java.net.SocketException: Address family not supported by protocol
04-13 11:51:09.437: DEBUG/AndroidRuntime(13754): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
04-13 11:51:09.447: DEBUG/AndroidRuntime(13754): CheckJNI is ON
04-13 11:51:10.177: DEBUG/AndroidRuntime(13754): --- registering native functions ---
04-13 11:51:11.778: DEBUG/dalvikvm(237): GC_EXPLICIT freed 130 objects / 6888 bytes in 173ms
04-13 11:51:12.118: DEBUG/PackageParser(42): Scanning package: /data/app/vmdl15520.tmp
04-13 11:51:12.617: DEBUG/dalvikvm(42): GC_FOR_MALLOC freed 10372 objects / 539304 bytes in 179ms
04-13 11:51:12.888: INFO/PackageManager(42): Removing non-system package:com.android.akshara
04-13 11:51:12.897: INFO/ActivityManager(42): Force stopping package com.android.akshara uid=10037
04-13 11:51:12.897: INFO/Process(42): Sending signal. PID: 11795 SIG: 9
04-13 11:51:12.907: INFO/ActivityManager(42): Force finishing activity HistoryRecord{440a9ae0 com.android.akshara/.Akshara}
04-13 11:51:12.907: INFO/ActivityManager(42): Force finishing activity HistoryRecord{4409d0b8 com.android.akshara/.PartThree}
04-13 11:51:12.917: INFO/ActivityManager(42): Force finishing activity HistoryRecord{43f007d8 com.android.akshara/.MyActivity}
04-13 11:51:12.977: INFO/WindowManager(42): WIN DEATH: Window{43fb37b8 com.android.akshara/com.android.akshara.MyActivity paused=true}
04-13 11:51:12.987: INFO/WindowManager(42): WIN DEATH: Window{43fff9d8 com.android.akshara/com.android.akshara.PartThree paused=true}
04-13 11:51:12.987: INFO/WindowManager(42): WIN DEATH: Window{43f46c80 com.android.akshara/com.android.akshara.Akshara paused=true}
04-13 11:51:13.267: DEBUG/PackageManager(42): Scanning package com.android.akshara
04-13 11:51:13.267: INFO/PackageManager(42): Package com.android.akshara codePath changed from /data/app/com.android.akshara-2.apk to /data/app/com.android.akshara-1.apk; Retaining data and using new
04-13 11:51:13.277: INFO/PackageManager(42): /data/app/com.android.akshara-1.apk changed; unpacking
04-13 11:51:13.307: DEBUG/installd(35): DexInv: --- BEGIN '/data/app/com.android.akshara-1.apk' ---
04-13 11:51:13.737: DEBUG/dalvikvm(13789): DexOpt: load 57ms, verify 167ms, opt 8ms
04-13 11:51:13.797: DEBUG/installd(35): DexInv: --- END '/data/app/com.android.akshara-1.apk' (success) ---
04-13 11:51:13.797: WARN/PackageManager(42): Code path for pkg : com.android.akshara changing from /data/app/com.android.akshara-2.apk to /data/app/com.android.akshara-1.apk
04-13 11:51:13.797: WARN/PackageManager(42): Resource path for pkg : com.android.akshara changing from /data/app/com.android.akshara-2.apk to /data/app/com.android.akshara-1.apk
04-13 11:51:13.807: DEBUG/PackageManager(42): Activities: com.android.akshara.MyActivity com.android.akshara.PartThree com.android.akshara.Akshara com.android.akshara.MatchIt com.android.akshara.PartFour
04-13 11:51:13.817: INFO/ActivityManager(42): Force stopping package com.android.akshara uid=10037
04-13 11:51:13.977: INFO/installd(35): move /data/dalvik-cache/data@app@com.android.akshara-1.apk@classes.dex -> /data/dalvik-cache/data@app@com.android.akshara-1.apk@classes.dex
04-13 11:51:13.987: DEBUG/PackageManager(42): New package installed in /data/app/com.android.akshara-1.apk
04-13 11:51:14.237: INFO/ActivityManager(42): Force stopping package com.android.akshara uid=10037
04-13 11:51:14.397: DEBUG/dalvikvm(120): GC_EXPLICIT freed 428 objects / 29064 bytes in 118ms
04-13 11:51:14.927: DEBUG/dalvikvm(42): GC_EXPLICIT freed 6350 objects / 409384 bytes in 268ms
04-13 11:51:14.927: INFO/installd(35): unlink /data/dalvik-cache/data@app@com.android.akshara-2.apk@classes.dex
04-13 11:51:14.947: DEBUG/AndroidRuntime(13754): Shutting down VM
04-13 11:51:14.988: DEBUG/dalvikvm(13754): Debugger has detached; object registry had 1 entries
04-13 11:51:15.037: INFO/AndroidRuntime(13754): NOTE: attach of thread 'Binder Thread #3' failed
04-13 11:51:15.117: WARN/RecognitionManagerService(42): no available voice recognition services found
04-13 11:51:16.037: DEBUG/AndroidRuntime(13795): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
04-13 11:51:16.037: DEBUG/AndroidRuntime(13795): CheckJNI is ON
04-13 11:51:16.287: DEBUG/AndroidRuntime(13795): --- registering native functions ---
04-13 11:51:17.307: INFO/ActivityManager(42): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.android.akshara/.MyActivity }
04-13 11:51:17.387: DEBUG/AndroidRuntime(13795): Shutting down VM
04-13 11:51:17.407: DEBUG/dalvikvm(13795): Debugger has detached; object registry had 1 entries
04-13 11:51:17.477: INFO/AndroidRuntime(13795): NOTE: attach of thread 'Binder Thread #3' failed
04-13 11:51:17.487: INFO/ActivityManager(42): Start proc com.android.akshara for activity com.android.akshara/.MyActivity: pid=13802 uid=10037 gids={1015}
04-13 11:51:19.107: DEBUG/dalvikvm(13802): GC_EXTERNAL_ALLOC freed 713 objects / 53888 bytes in 172ms
04-13 11:51:19.417: INFO/Database(13802): sqlite returned: error code = 1, msg = no such table: android_metadata
04-13 11:51:19.417: ERROR/Database(13802): SELECT locale FROM android_metadata failed
04-13 11:51:19.447: ERROR/Database(13802): Failed to setLocale() when constructing, closing the database
04-13 11:51:19.447: ERROR/Database(13802): android.database.sqlite.SQLiteException: no such table: android_metadata
04-13 11:51:19.447: ERROR/Database(13802): at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
04-13 11:51:19.447: ERROR/Database(13802): at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:1950)
04-13 11:51:19.447: ERROR/Database(13802): at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1818)
04-13 11:51:19.447: ERROR/Database(13802): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:817)
04-13 11:51:19.447: ERROR/Database(13802): at com.android.akshara.Dbhelper.checkDatabase(Dbhelper.java:67)
04-13 11:51:19.447: ERROR/Database(13802): at com.android.akshara.Dbhelper.createDataBase(Dbhelper.java:34)
04-13 11:51:19.447: ERROR/Database(13802): at com.android.akshara.MyActivity.setupDatabase(MyActivity.java:70)
04-13 11:51:19.447: ERROR/Database(13802): at com.android.akshara.MyActivity.onCreate(MyActivity.java:24)
04-13 11:51:19.447: ERROR/Database(13802): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-13 11:51:19.447: ERROR/Database(13802): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
04-13 11:51:19.447: ERROR/Database(13802): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-13 11:51:19.447: ERROR/Database(13802): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
04-13 11:51:19.447: ERROR/Database(13802): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-13 11:51:19.447: ERROR/Database(13802): at android.os.Handler.dispatchMessage(Handler.java:99)
04-13 11:51:19.447: ERROR/Database(13802): at android.os.Looper.loop(Looper.java:123)
04-13 11:51:19.447: ERROR/Database(13802): at android.app.ActivityThread.main(ActivityThread.java:4627)
04-13 11:51:19.447: ERROR/Database(13802): at java.lang.reflect.Method.invokeNative(Native Method)
04-13 11:51:19.447: ERROR/Database(13802): at java.lang.reflect.Method.invoke(Method.java:521)
04-13 11:51:19.447: ERROR/Database(13802): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-13 11:51:19.447: ERROR/Database(13802): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
04-13 11:51:19.447: ERROR/Database(13802): at dalvik.system.NativeStart.main(Native Method)
04-13 11:51:19.857: ERROR/Dbhelper(13802): createDatabase database created
04-13 11:51:20.578: INFO/ActivityManager(42): Displayed activity com.android.akshara/.MyActivity: 3211 ms (total 3211 ms)
04-13 11:51:22.167: DEBUG/AudioSink(34): bufferCount (4) is too small and increased to 12
04-13 11:51:22.197: INFO/ActivityManager(42): Starting activity: Intent { cmp=com.android.akshara/.PartThree }
04-13 11:51:23.367: INFO/ActivityManager(42): Displayed activity com.android.akshara/.PartThree: 846 ms (total 846 ms)
04-13 11:51:24.098: INFO/ActivityManager(42): Starting activity: Intent { cmp=com.android.akshara/.Akshara }
04-13 11:51:24.317: DEBUG/ERR(13802): List A shuffling[10, 5, 4, 12, 2, 9, 11, 8, 6, 7, 1, 3]
04-13 11:51:24.387: DEBUG/ERR(13802): SIZE : 12
04-13 11:51:24.387: DEBUG/ERR(13802): RANDOM11
04-13 11:51:24.397: DEBUG/ERR(13802): RANDOM3
04-13 11:51:24.397: DEBUG/ERR(13802): RANDOM12
04-13 11:51:24.427: DEBUG/ERR(13802): List after shuffling: [1, 2, 3, 0]
04-13 11:51:25.027: INFO/ActivityManager(42): Displayed activity com.android.akshara/.Akshara: 792 ms (total 792 ms)
04-13 11:51:30.368: DEBUG/dalvikvm(237): GC_EXPLICIT freed 156 objects / 11208 bytes in 300ms
04-13 11:51:35.247: DEBUG/dalvikvm(261): GC_EXPLICIT freed 44 objects / 2072 bytes in 175ms
04-13 11:51:40.387: DEBUG/dalvikvm(120): GC_EXPLICIT freed 823 objects / 45520 bytes in 257ms
04-13 11:52:24.137: DEBUG/AndroidRuntime(14038): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
04-13 11:52:24.137: DEBUG/AndroidRuntime(14038): CheckJNI is ON
04-13 11:52:24.427: DEBUG/AndroidRuntime(14038): --- registering native functions ---
04-13 11:52:25.517: DEBUG/AndroidRuntime(14038): Shutting down VM
04-13 11:52:25.527: DEBUG/dalvikvm(14038): Debugger has detached; object registry had 1 entries
04-13 11:52:25.569: INFO/AndroidRuntime(14038): NOTE: attach of thread 'Binder Thread #3' failed
04-13 11:52:26.317: DEBUG/AndroidRuntime(14046): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
04-13 11:52:26.317: DEBUG/AndroidRuntime(14046): CheckJNI is ON
04-13 11:52:26.607: DEBUG/AndroidRuntime(14046): --- registering native functions ---
04-13 11:52:27.937: INFO/ActivityManager(42): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.android.akshara/.MyActivity }
04-13 11:52:27.997: DEBUG/AndroidRuntime(14046): Shutting down VM
04-13 11:52:28.007: DEBUG/dalvikvm(14046): Debugger has detached; object registry had 1 entries
04-13 11:52:28.047: INFO/AndroidRuntime(14046): NOTE: attach of thread 'Binder Thread #3' failed
04-13 11:52:31.938: INFO/ActivityManager(42): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.android.launcher/com.android.launcher2.Launcher }
04-13 11:52:31.988: WARN/InputManagerService(42): Ignoring hideSoftInput of: com.android.internal.view.IInputMethodClient$Stub$Proxy@43fdcda8
04-13 11:52:38.458: DEBUG/dalvikvm(12214): GC_EXPLICIT freed 1120 objects / 83648 bytes in 647ms
04-13 11:52:41.437: DEBUG/AndroidRuntime(14116): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
04-13 11:52:41.437: DEBUG/AndroidRuntime(14116): CheckJNI is ON
04-13 11:52:41.707: DEBUG/AndroidRuntime(14116): --- registering native functions ---
04-13 11:52:43.177: DEBUG/AndroidRuntime(14116): Shutting down VM
04-13 11:52:43.187: DEBUG/dalvikvm(14116): Debugger has detached; object registry had 1 entries
04-13 11:52:43.231: INFO/AndroidRuntime(14116): NOTE: attach of thread 'Binder Thread #3' failed
04-13 11:52:43.967: DEBUG/AndroidRuntime(14128): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
04-13 11:52:43.967: DEBUG/AndroidRuntime(14128): CheckJNI is ON
04-13 11:52:44.287: DEBUG/AndroidRuntime(14128): --- registering native functions ---
04-13 11:52:44.927: DEBUG/dalvikvm(13802): GC_EXPLICIT freed 1371 objects / 96560 bytes in 2143ms
04-13 11:52:45.187: ERROR/Database(13802): close() was never explicitly called on database '/data/data/com.android.akshara/databases/akshara.db'
04-13 11:52:45.187: ERROR/Database(13802): android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here
04-13 11:52:45.187: ERROR/Database(13802): at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1810)
04-13 11:52:45.187: ERROR/Database(13802): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:817)
04-13 11:52:45.187: ERROR/Database(13802): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:851)
04-13 11:52:45.187: ERROR/Database(13802): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:844)
04-13 11:52:45.187: ERROR/Database(13802): at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:540)
04-13 11:52:45.187: ERROR/Database(13802): at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:203)
04-13 11:52:45.187: ERROR/Database(13802): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:98)
04-13 11:52:45.187: ERROR/Database(13802): at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:158)
04-13 11:52:45.187: ERROR/Database(13802): at com.android.akshara.Dbhelper.createDataBase(Dbhelper.java:42)
04-13 11:52:45.187: ERROR/Database(13802): at com.android.akshara.MyActivity.setupDatabase(MyActivity.java:70)
04-13 11:52:45.187: ERROR/Database(13802): at com.android.akshara.MyActivity.onCreate(MyActivity.java:24)
04-13 11:52:45.187: ERROR/Database(13802): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-13 11:52:45.187: ERROR/Database(13802): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
04-13 11:52:45.187: ERROR/Database(13802): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-13 11:52:45.187: ERROR/Database(13802): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
04-13 11:52:45.187: ERROR/Database(13802): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-13 11:52:45.187: ERROR/Database(13802): at android.os.Handler.dispatchMessage(Handler.java:99)
04-13 11:52:45.187: ERROR/Database(13802): at android.os.Looper.loop(Looper.java:123)
04-13 11:52:45.187: ERROR/Database(13802): at android.app.ActivityThread.main(ActivityThread.java:4627)
04-13 11:52:45.187: ERROR/Database(13802): at java.lang.reflect.Method.invokeNative(Native Method)
04-13 11:52:45.187: ERROR/Database(13802): at java.lang.reflect.Method.invoke(Method.java:521)
04-13 11:52:45.187: ERROR/Database(13802): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-13 11:52:45.187: ERROR/Database(13802): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
04-13 11:52:45.187: ERROR/Database(13802): at dalvik.system.NativeStart.main(Native Method)
04-13 11:52:45.477: INFO/ActivityManager(42): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.android.akshara/.MyActivity }
04-13 11:52:45.577: DEBUG/AndroidRuntime(14128): Shutting down VM
04-13 11:52:45.637: DEBUG/dalvikvm(14128): Debugger has detached; object registry had 1 entries
04-13 11:52:45.710: INFO/AndroidRuntime(14128): NOTE: attach of thread 'Binder Thread #3' failed
04-13 11:52:46.087: WARN/InputManagerService(42): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@43e71578
04-13 11:52:51.597: DEBUG/dalvikvm(120): GC_EXPLICIT freed 266 objects / 13832 bytes in 174ms
04-13 11:52:54.377: DEBUG/ERR(13802): SIZE : 12
04-13 11:52:54.387: DEBUG/ERR(13802): RANDOM9
04-13 11:52:54.387: DEBUG/ERR(13802): RANDOM11
04-13 11:52:54.397: DEBUG/ERR(13802): RANDOM2
04-13 11:52:54.417: DEBUG/ERR(13802): List after shuffling: [3, 1, 0, 2]
04-13 11:52:59.367: DEBUG/ERR(13802): SIZE : 12
04-13 11:52:59.367: DEBUG/ERR(13802): RANDOM1
04-13 11:52:59.377: DEBUG/ERR(13802): RANDOM5
04-13 11:52:59.377: DEBUG/ERR(13802): RANDOM12
04-13 11:52:59.417: DEBUG/ERR(13802): List after shuffling: [0, 3, 2, 1]
04-13 11:53:00.477: DEBUG/ERR(13802): SIZE : 12
04-13 11:53:00.507: DEBUG/ERR(13802): RANDOM5
04-13 11:53:00.507: DEBUG/ERR(13802): RANDOM6
04-13 11:53:00.517: DEBUG/ERR(13802): RANDOM8
04-13 11:53:00.547: DEBUG/ERR(13802): List after shuffling: [1, 3, 0, 2]
04-13 11:53:01.867: DEBUG/ERR(13802): SIZE : 12
04-13 11:53:01.867: DEBUG/ERR(13802): RANDOM3
04-13 11:53:01.867: DEBUG/ERR(13802): RANDOM9
04-13 11:53:01.877: DEBUG/ERR(13802): RANDOM7
04-13 11:53:01.897: DEBUG/ERR(13802): List after shuffling: [3, 1, 0, 2]
04-13 11:53:06.348: DEBUG/ERR(13802): right
04-13 11:53:11.678: DEBUG/ERR(13802): SIZE : 12
04-13 11:53:11.688: DEBUG/ERR(13802): RANDOM6
04-13 11:53:11.688: DEBUG/ERR(13802): RANDOM12
04-13 11:53:11.697: DEBUG/ERR(13802): RANDOM9
04-13 11:53:11.718: DEBUG/ERR(13802): List after shuffling: [1, 0, 3, 2]