android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14) android sqlite 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 应该是其它权限问题,看看完整的log Add more logs.BtOppRfcommListener: Error create RfcommServerSocket java.io.IOException: Error: -101-02 09:23:46.450 23680 2691 E SQLiteLog: (14) cannot open file at line 30191 of [00bb9c9ce4]01-02 09:23:46.450 23680 2691 E SQLiteLog: (14) os_unix.c:30191: (24) open(/data/data/com.android.bluetooth/databases/btopp.db-journal) - 01-02 09:23:46.450 23680 2691 E SQLiteLog: (14) cannot open file at line 30191 of [00bb9c9ce4]01-02 09:23:46.450 23680 2691 E SQLiteLog: (14) os_unix.c:30191: (24) open(/data/data/com.android.bluetooth/databases/btopp.db-journal) - 01-02 09:23:46.450 23680 2691 E SQLiteLog: (14) statement aborts at 23: [SELECT * FROM btopp ORDER BY _id] unable to open database file01-02 09:23:46.450 23680 23680 W BluetoothAdapter: getBluetoothService() called with no BluetoothManagerCallback01-02 09:23:46.450 23680 2691 E SQLiteQuery: exception: unable to open database file (code 14); query: SELECT * FROM btopp ORDER BY _id01-02 09:23:46.450 23680 23680 E BluetoothServiceJni: SOCK FLAG = 0 ***********************01-02 09:23:46.450 23680 23680 E bt-btif : socketpair failed, errno:2401-02 09:23:46.450 23680 23680 E BluetoothServiceJni: Socket listen failed: 101-02 09:23:46.450 23680 23680 E BluetoothAdapterService(1101198288): Failed to create socket channel01-02 09:23:46.450 23680 23680 E BluetoothFtpService: Error create RfcommServerSocket java.io.IOException: Error: -101-02 09:23:46.450 23680 23680 V BluetoothFtpService: wait 300 ms01-02 09:23:46.450 23680 2691 W dalvikvm: threadid=32: thread exiting with uncaught exception (group=0x416feba8)01-02 09:23:46.450 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 701-02 09:23:46.450 23680 2691 E AndroidRuntime: FATAL EXCEPTION: Bluetooth Share Service01-02 09:23:46.450 23680 2691 E AndroidRuntime: Process: com.android.bluetooth, PID: 2368001-02 09:23:46.450 23680 2691 E AndroidRuntime: android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file (code 14)01-02 09:23:46.450 23680 2691 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.nativeExecuteForCursorWindow(Native Method)01-02 09:23:46.450 23680 2691 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.executeForCursorWindow(SQLiteConnection.java:878)01-02 09:23:46.450 23680 2691 E AndroidRuntime: at android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:836)01-02 09:23:46.450 23680 2691 E AndroidRuntime: at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:62)01-02 09:23:46.450 23680 2691 E AndroidRuntime: at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:144)01-02 09:23:46.450 23680 2691 E AndroidRuntime: at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:133)01-02 09:23:46.450 23680 2691 E AndroidRuntime: at android.content.ContentResolver.query(ContentResolver.java:480)01-02 09:23:46.450 23680 2691 E AndroidRuntime: at android.content.ContentResolver.query(ContentResolver.java:404)01-02 09:23:46.450 23680 2691 E AndroidRuntime: at com.android.bluetooth.opp.BluetoothOppService$UpdateThread.run(BluetoothOppService.java:426)01-02 09:23:46.480 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 701-02 09:23:46.480 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 701-02 09:23:46.480 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 701-02 09:23:46.480 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 701-02 09:23:46.490 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 701-02 09:23:46.490 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 701-02 09:23:46.490 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 701-02 09:23:46.490 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 701-02 09:23:46.490 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 701-02 09:23:46.490 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 701-02 09:23:46.490 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 701-02 09:23:46.490 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 701-02 09:23:46.550 569 588 D dalvikvm: GC_FOR_ALLOC freed 371K, 18% free 7200K/8716K, paused 62ms, total 63ms01-02 09:23:46.560 569 588 I dalvikvm-heap: Grow heap (frag case) to 8.028MB for 951344-byte allocation01-02 09:23:46.630 569 592 D dalvikvm: GC_FOR_ALLOC freed 16K, 16% free 8112K/9648K, paused 68ms, total 68ms01-02 09:23:46.750 569 746 D BluetoothManagerService: checkIfCallerIsForegroundUser: valid=true callingUser=0 foregroundUser=001-02 09:23:46.750 569 10346 D BluetoothManagerService: checkIfCallerIsForegroundUser: valid=true callingUser=0 foregroundUser=001-02 09:23:46.760 23680 2693 W BluetoothAdapter: getBluetoothService() called with no BluetoothManagerCallback01-02 09:23:46.760 23680 23680 W BluetoothAdapter: getBluetoothService() called with no BluetoothManagerCallback01-02 09:23:46.760 23680 2693 E BluetoothServiceJni: SOCK FLAG = 0 ***********************01-02 09:23:46.760 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 701-02 09:23:46.760 23680 23680 E BluetoothServiceJni: SOCK FLAG = 0 ***********************01-02 09:23:46.760 23680 23680 E bt-btif : socketpair failed, errno:2401-02 09:23:46.760 23680 23680 E BluetoothServiceJni: Socket listen failed: 101-02 09:23:46.760 23680 23680 E BluetoothAdapterService(1101198288): Failed to create socket channel01-02 09:23:46.760 23680 23680 E BluetoothFtpService: Error create RfcommServerSocket java.io.IOException: Error: -101-02 09:23:46.760 23680 23680 V BluetoothFtpService: wait 300 ms01-02 09:23:47.060 569 12566 D BluetoothManagerService: checkIfCallerIsForegroundUser: valid=true callingUser=0 foregroundUser=001-02 09:23:47.060 569 12565 D BluetoothManagerService: checkIfCallerIsForegroundUser: valid=true callingUser=0 foregroundUser=001-02 09:23:47.070 23680 23680 W BluetoothAdapter: getBluetoothService() called with no BluetoothManagerCallback 这些操作都是android中sqlite的公共函数,应该没有错误,不知道还有什么可能。刚才看了下sqlite中出现该exception的地方如下int fillWindow(CursorWindow window, int startPos, int requiredPos, boolean countAllRows) { acquireReference(); try { window.acquireReference(); try { int numRows = getSession().executeForCursorWindow(getSql(), getBindArgs(), window, startPos, requiredPos, countAllRows, getConnectionFlags(), mCancellationSignal); return numRows; } catch (SQLiteDatabaseCorruptException ex) { onCorruption(); throw ex; } catch (SQLiteException ex) { Log.e(TAG, "exception: " + ex.getMessage() + "; query: " + getSql()); throw ex; } finally { window.releaseReference(); } } finally { releaseReference(); } }不知道这个low Memroy有什么关系,难道是内存用尽的原因吗? <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />这个权限也加上试试。 你是在自己的应用下打开com.android.bluetooth下的数据库文件? 谢谢您的热情帮助。不过。在JellyBean中,Android添加了一个新的权限”android.permission.READ_EXTERNAL_STORAGE”,顾名思义该权限说明该程序可以读取设备外部存储空间(内置SDcard和外置SDCard)的文件,如果您的App已经添加了“WRITE_EXTERNAL_STORAGE ”权限 ,则就没必要添加读的权限了,写权限已经包含了读权限了。Read more: http://blog.chengyunfeng.com/?p=427#ixzz3EIx69sko 我是在跑一个蓝牙开关stress的时候出现的。 我是在跑一个蓝牙开关stress的时候出现的。stress?没用过,如果是第三方的应用的话,是没有权限读取/data/data/com.android.bluetooth下的文件的,只能访问data里自己目录下的文件 应该不是权限问题,重点分析下数据库cursor或者file操作完成后,是否及时回收释放?文件或者cursor打开句柄太多也会造成这种现象。 id cannot be resolved or is not a field 关于android通过HDMI接口双屏显示不同内容问题!高分 求protobuf中文资料并翻译下面一段英文 如何判断手机当前是不是处于待机状态 EditText问题?……在线等待 安卓定位信息模拟 如何在一个WebView点击链接后使用别一个Activity来打开内容 android播放flash 斗地主手机端连接服务器后怎么没有桌子和房间怎么回事? 【求助】fragment的onActivityResult问题 安卓开发解析网站实现登陆 Android问题求助
01-02 09:23:46.450 23680 2691 E SQLiteLog: (14) cannot open file at line 30191 of [00bb9c9ce4]
01-02 09:23:46.450 23680 2691 E SQLiteLog: (14) os_unix.c:30191: (24) open(/data/data/com.android.bluetooth/databases/btopp.db-journal) -
01-02 09:23:46.450 23680 2691 E SQLiteLog: (14) cannot open file at line 30191 of [00bb9c9ce4]
01-02 09:23:46.450 23680 2691 E SQLiteLog: (14) os_unix.c:30191: (24) open(/data/data/com.android.bluetooth/databases/btopp.db-journal) -
01-02 09:23:46.450 23680 2691 E SQLiteLog: (14) statement aborts at 23: [SELECT * FROM btopp ORDER BY _id] unable to open database file
01-02 09:23:46.450 23680 23680 W BluetoothAdapter: getBluetoothService() called with no BluetoothManagerCallback
01-02 09:23:46.450 23680 2691 E SQLiteQuery: exception: unable to open database file (code 14); query: SELECT * FROM btopp ORDER BY _id
01-02 09:23:46.450 23680 23680 E BluetoothServiceJni: SOCK FLAG = 0 ***********************
01-02 09:23:46.450 23680 23680 E bt-btif : socketpair failed, errno:24
01-02 09:23:46.450 23680 23680 E BluetoothServiceJni: Socket listen failed: 1
01-02 09:23:46.450 23680 23680 E BluetoothAdapterService(1101198288): Failed to create socket channel
01-02 09:23:46.450 23680 23680 E BluetoothFtpService: Error create RfcommServerSocket java.io.IOException: Error: -1
01-02 09:23:46.450 23680 23680 V BluetoothFtpService: wait 300 ms
01-02 09:23:46.450 23680 2691 W dalvikvm: threadid=32: thread exiting with uncaught exception (group=0x416feba8)
01-02 09:23:46.450 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 7
01-02 09:23:46.450 23680 2691 E AndroidRuntime: FATAL EXCEPTION: Bluetooth Share Service
01-02 09:23:46.450 23680 2691 E AndroidRuntime: Process: com.android.bluetooth, PID: 23680
01-02 09:23:46.450 23680 2691 E AndroidRuntime: android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file (code 14)
01-02 09:23:46.450 23680 2691 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.nativeExecuteForCursorWindow(Native Method)
01-02 09:23:46.450 23680 2691 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.executeForCursorWindow(SQLiteConnection.java:878)
01-02 09:23:46.450 23680 2691 E AndroidRuntime: at android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:836)
01-02 09:23:46.450 23680 2691 E AndroidRuntime: at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:62)
01-02 09:23:46.450 23680 2691 E AndroidRuntime: at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:144)
01-02 09:23:46.450 23680 2691 E AndroidRuntime: at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:133)
01-02 09:23:46.450 23680 2691 E AndroidRuntime: at android.content.ContentResolver.query(ContentResolver.java:480)
01-02 09:23:46.450 23680 2691 E AndroidRuntime: at android.content.ContentResolver.query(ContentResolver.java:404)
01-02 09:23:46.450 23680 2691 E AndroidRuntime: at com.android.bluetooth.opp.BluetoothOppService$UpdateThread.run(BluetoothOppService.java:426)
01-02 09:23:46.480 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 7
01-02 09:23:46.480 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 7
01-02 09:23:46.480 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 7
01-02 09:23:46.480 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 7
01-02 09:23:46.490 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 7
01-02 09:23:46.490 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 7
01-02 09:23:46.490 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 7
01-02 09:23:46.490 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 7
01-02 09:23:46.490 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 7
01-02 09:23:46.490 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 7
01-02 09:23:46.490 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 7
01-02 09:23:46.490 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 7
01-02 09:23:46.550 569 588 D dalvikvm: GC_FOR_ALLOC freed 371K, 18% free 7200K/8716K, paused 62ms, total 63ms
01-02 09:23:46.560 569 588 I dalvikvm-heap: Grow heap (frag case) to 8.028MB for 951344-byte allocation
01-02 09:23:46.630 569 592 D dalvikvm: GC_FOR_ALLOC freed 16K, 16% free 8112K/9648K, paused 68ms, total 68ms
01-02 09:23:46.750 569 746 D BluetoothManagerService: checkIfCallerIsForegroundUser: valid=true callingUser=0 foregroundUser=0
01-02 09:23:46.750 569 10346 D BluetoothManagerService: checkIfCallerIsForegroundUser: valid=true callingUser=0 foregroundUser=0
01-02 09:23:46.760 23680 2693 W BluetoothAdapter: getBluetoothService() called with no BluetoothManagerCallback
01-02 09:23:46.760 23680 23680 W BluetoothAdapter: getBluetoothService() called with no BluetoothManagerCallback
01-02 09:23:46.760 23680 2693 E BluetoothServiceJni: SOCK FLAG = 0 ***********************
01-02 09:23:46.760 23680 2674 D bluedroid-mrvl: bt_vnd_mrvl_if_op(L102): opcode = 7
01-02 09:23:46.760 23680 23680 E BluetoothServiceJni: SOCK FLAG = 0 ***********************
01-02 09:23:46.760 23680 23680 E bt-btif : socketpair failed, errno:24
01-02 09:23:46.760 23680 23680 E BluetoothServiceJni: Socket listen failed: 1
01-02 09:23:46.760 23680 23680 E BluetoothAdapterService(1101198288): Failed to create socket channel
01-02 09:23:46.760 23680 23680 E BluetoothFtpService: Error create RfcommServerSocket java.io.IOException: Error: -1
01-02 09:23:46.760 23680 23680 V BluetoothFtpService: wait 300 ms
01-02 09:23:47.060 569 12566 D BluetoothManagerService: checkIfCallerIsForegroundUser: valid=true callingUser=0 foregroundUser=0
01-02 09:23:47.060 569 12565 D BluetoothManagerService: checkIfCallerIsForegroundUser: valid=true callingUser=0 foregroundUser=0
01-02 09:23:47.070 23680 23680 W BluetoothAdapter: getBluetoothService() called with no BluetoothManagerCallback
刚才看了下sqlite中出现该exception的地方如下int fillWindow(CursorWindow window, int startPos, int requiredPos, boolean countAllRows) {
acquireReference();
try {
window.acquireReference();
try {
int numRows = getSession().executeForCursorWindow(getSql(), getBindArgs(),
window, startPos, requiredPos, countAllRows, getConnectionFlags(),
mCancellationSignal);
return numRows;
} catch (SQLiteDatabaseCorruptException ex) {
onCorruption();
throw ex;
} catch (SQLiteException ex) {
Log.e(TAG, "exception: " + ex.getMessage() + "; query: " + getSql());
throw ex;
} finally {
window.releaseReference();
}
} finally {
releaseReference();
}
}不知道这个low Memroy有什么关系,难道是内存用尽的原因吗?
在JellyBean中,Android添加了一个新的权限”android.permission.READ_EXTERNAL_STORAGE”,顾名思义该权限说明该程序可以读取设备外部存储空间(内置SDcard和外置SDCard)的文件,如果您的App已经添加了“WRITE_EXTERNAL_STORAGE ”权限 ,则就没必要添加读的权限了,写权限已经包含了读权限了。Read more: http://blog.chengyunfeng.com/?p=427#ixzz3EIx69sko
文件或者cursor打开句柄太多也会造成这种现象。