`
Sev7en_jun
  • 浏览: 1225486 次
  • 性别: Icon_minigender_1
  • 来自: 广州
博客专栏
84184fc0-d0b6-3f7f-a3f0-4202acb3caf5
Apache CXF使用s...
浏览量:111305
社区版块
存档分类
最新评论

解决android: Could not open database Failed to open database '/data/data

 
阅读更多
原因:
本人遇到的是因为没有给数据库文件test.db读写的权限,赋权限后即可正常访问
 
06-14 07:10:27.257: E/SQLiteLog(1316): (14) os_unix.c:30176: (13) open(/data/data/com.example.login/files/test.db) -
06-14 07:10:27.367: E/SQLiteDatabase(1316): Failed to open database '/data/data/com.example.login/files/test.db'.
06-14 07:10:27.367: E/SQLiteDatabase(1316): android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:209)
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:193)
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463)
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185)
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177)
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:804)
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:789)
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:694)
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:709)
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at com.example.login.LoginActivity.onCreate(LoginActivity.java:33)
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at android.app.Activity.performCreate(Activity.java:5104)
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at android.app.ActivityThread.access$600(ActivityThread.java:141)
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at android.os.Handler.dispatchMessage(Handler.java:99)
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at android.os.Looper.loop(Looper.java:137)
06-14 07:10:27.367: E/SQLiteDatabase(1316):     at android.app.ActivityThread.main(ActivityThread.java:5039)
分享到:
评论

相关推荐

    php.ini-development

    data to the client. If your application's output exceeds this setting, PHP ; will send that data in chunks of roughly the size you specify. ; Turning on this setting and managing its maximum buffer ...

    计算机网络第六版答案

    14. If the two ISPs do not peer with each other, then when they send traffic to each other they have to send the traffic through a provider ISP (intermediary), to which they have to pay for carrying ...

    端口查看工具

    o Fixed the problem with sending the data to stdout (when the filename is empty string). * Version 1.93: o Updated the internal country names (added more 14 countries) that are used for ...

    S7A驱动720版本

    - From the S7A power tool it wasn't possible to open the online help file. Now it can be opened and also the context-sensitive help works properly. - When the signal conditioning function "S&M" ...

    单实例转RAC-数据库迁移.doc

    LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/db_1/dbs/initBOBOSER1.ora' starting Oracle instance without parameter file for retrieval of spfile Oracle instance started ...

    微软内部资料-SQL性能优化3

    SQL Server needs to lock data that does not exist! If no rows satisfy the WHERE condition the first time the range is scanned, no rows should be returned on any subsequent scans. Key range locks are ...

    EurekaLog_7.5.0.0_Enterprise

    1)....Added "ECC32TradeSpeedForMemory" option - defaults to 0/False, could be changed to 1 via Custom/Manual tab. This option will switch from fast-methods to slower methods, but which take less ...

    程序BDE错误码对照表

    本文将详细介绍“程序BDE错误码对照表”中的各个错误码及其含义,帮助开发者更好地理解和处理在使用BDE(Borland Database Engine)时可能遇到的问题。 #### 一、基本错误码 **1. 0x0021(33) - SystemError** - **...

    PHP基础教程 是一个比较有价值的PHP新手教程!

    解决方法就是将经常用来编写CGI程序的语言的解释器编译进你的web服务器(比如mod_perl,JSP)。PHP就可以以这种方式安装,虽然很少有人愿意这样以CGI方式安装它。内嵌的PHP可以具有更高的可伸缩性。 - 更多特点 PHP的...

    win系统连接SQLServer驱动

    echo "Connection could not be established.<br />"; die( print_r( sqlsrv_errors(), true)); } ``` 3. **ODBC(Open Database Connectivity)**: 压缩包中的"Ms ODBC SQL"可能指的是Microsoft ODBC驱动...

    使用PHP连接多种数据库的实现代码(mysql,access,sqlserver,Oracle)

    echo "Failed - Could not connect to database"; } // 关闭连接 oci_logoff($conn); ?> ``` 以上代码示例展示了如何使用PHP连接到MySQL、Access、SQL Server和Oracle数据库。了解这些方法有助于开发者根据项目...

Global site tag (gtag.js) - Google Analytics