- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我在 Android 的 SQLite 数据库中实现外键。
我的数据库在没有 FK 的情况下运行良好,但现在,我遇到了几个问题。
一个是当我尝试获取对数据库的引用时,我遇到了这个错误。
E/SQLiteLog﹕ (10) Failed to do file read, got: 0, amt: 100, last Errno: 2
我的函数:
public synchronized SQLiteDatabase openDatabase() {
if (mOpenCounter.incrementAndGet() == 1) {
// Opening new database
mDatabase = mDatabaseHelper.getWritableDatabase();
// Get Foreign Key Support
mDatabase.execSQL("PRAGMA foreign_keys=ON");
}
return mDatabase;
}
错误发生在行中:
mDatabase = mDatabaseHelper.getWritableDatabase();
这行好像是第一次调用。其他时间,没有pb。我不确定它会给我直接错误,但我在 SQLite 中遇到了几个问题,因此它可能会导致不良行为。
发送
最佳答案
试试这个:
uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
关于android - E/SQLiteLog: (10) Failed to do file read, got : 0, amt : 100, last Errno: 2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29135397/
我正在尝试从android中的SQLite开始,但是我有一些问题。 我从2012年编写的教程中获取了代码,但现在对我不起作用,并向我显示此错误: E/SQLiteLog﹕ (1) near "Tabl
我尝试将数据保存在我的应用程序数据库中一段时间,但仍然遇到相同的问题。这是我的代码的样子。 在数据库页面中: public void insererTrajetTest (String et_Vi
当我在数据库浏览器中打开数据库文件时,它是空的。我得到这个 E/SQLiteLog:(283)从 WAL 文件中恢复了 16 帧。使用 Room 保存数据并在应用程序关闭时将其填充回去是否合适?如果有
我开始使用 novoda/SQLiteProvider在新的 Android/Gradle 项目中遵循他们的“简单”演示项目。似乎我缺少一些导致创建表的步骤/配置。这就是我最终遇到此错误的原因: SQ
我是应用程序开发的新手,我正在尝试构建一个搜索名为“All”的数据库表的应用程序,但不断收到此错误: E/SQLiteLog: (1) near "All": syntax error Error C
我有一个包含大约 10,000 条记录的表。 例如,我有以下实体: @Entity(tableName="cupcakes") public class CupcakeEntity { @Prim
这个问题在这里已经有了答案: What is a stack trace, and how can I use it to debug my application errors? (7 个回答) 5
嗨,我收到一条 SQL 错误,上面写着 E/SQLiteLog:(1)接近“每月”:语法错误 我相信这可能与我的创建表语句有关 private static final String CREATE
当我尝试写入数据库时,我的应用程序出现此错误E/SQLiteLog:(1) near "TABLEaccount": 语法错误 我不明白为什么?这是我的 SQLite 数据库代码。我在这里附上数据
我无法弄清楚这个错误的含义:SQLiteLog:(1)“s”附近:语法错误主要是因为我找不到它正在运行的数据库。 我正在构建一个电影数据库 Android 应用程序,我的原始目录中的数据库文件保持不变
我每次启动我的应用程序时都会遇到错误。 E/SQLiteLog: (283) recovered 22 frames from WAL file /data/data/com.dmitrysimako
我想在我的 Android 应用程序中使用 SQlite 来存储一些数据。在尝试运行该应用程序后我收到了这个错误: 06-21 16:14:30.175 2375-2375/snet.a
我正在尝试创建另一个到sqlite数据库的表,以从json链接插入新数据,突然我叠了这种错误,我已经在卸载和安装了我的应用程序,任何建议将不胜感激。 这是我的db dart文件。 //Creating
为什么数据库的应对不适用于 Android 9?我的实现是基于这个 example (video)。在从 4.1 到 10 的 Android 版本上一切正常,但在 9 Pie 上却不行。 这是我所做
我更改了数据库版本,在创建表的 SQL 函数中添加了适当数量的空格,并更新了将输入插入数据库的函数的参数,但 LogCat 仍然显示: E/SQLiteLog: (1) no such table:
我正在使用 this tutorial将数据库导入我的应用程序。 它在 API 10 上运行良好, 但在 API 17 上它会抛出以下错误: 05-19 14:52:46.492: E/SQLiteL
这是构造我的查询的代码,稍后在我的代码中由 execSQL() 调用。 public static final String TABLE_NAME = "active"; public
我在升级应用程序以支持 Android Lollipop 时遇到问题。该应用程序实现了一个 SyncAdapter,它通过内容提供程序在数据库上写入。同时,用户可能正在浏览应用程序的前端,加载程序从数
我在 Android 的 SQLite 数据库中实现外键。 我的数据库在没有 FK 的情况下运行良好,但现在,我遇到了几个问题。 一个是当我尝试获取对数据库的引用时,我遇到了这个错误。 E/SQLit
我是一名优秀的程序员,十分优秀!