ActiveAndroid问题no such table解决总结

android.database.sqlite.SQLiteException: no such table

at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)

at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)

at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)

at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)

at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)

at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)

at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)

at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1314)

at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1253)

at com.activeandroid.Model.rawQuery(Model.java:349)

1.模拟器问题,改成真机调试不会有问题

2.<meta-data android:name="AA_DB_NAME" android:value="name.db"/>"name.db"的命名不能为你的包名,比如包名为com.sometest.app,不能命名sometest.db

3.

<meta-data android:name="AA_MODELS" android:value="com.item.android.models.MyModel"/>

添加model到mainfest.xml

https://github.com/pardom/ActiveAndroid/wiki/Creating-your-database-model

Speeding up application startup

ActiveAndroid will look through all your files to find your Model classes. This process can be very slow if you have a lot of dependencies. To speed up this process, specify your Model classes explicitely in your AndroidManifest:

<meta-data     android:name="AA_MODELS"     android:value="com.myapp.model.Item, com.myapp.model.Category" />
时间: 2024-10-21 03:35:15

ActiveAndroid问题no such table解决总结的相关文章

doesn&#39;t contain a valid partition table 解决方法

输入 fdisk -l 可以看到 输入 fdisk /dev/xvdb 跟着向导一步步做下去(如果不知道该输入什么,就输入“m”并回车,可以打印出菜单): Command (m for help): m Command action a   toggle a bootable flag b   edit bsd disklabel c   toggle the dos compatibility flag d   delete a partition l   list known partiti

解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:

php5个版本,5.2.5.3.5.4.5.5,怕跟不上时代,新的服务器直接上5.5,但是程序出现如下错误:Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in,看意思就很明了,说mysql_connect这个模块将在未来弃用,请你使用mysqli或者PDO来替代. 解决方法1: 禁止PHP报错 d

display:table的几个用法

DIV+CSS的布局已经让表格布局几乎很少用到,除非表格语义性很强的情况. display:table解决了一部分需要使用表格特性但又不需要表格语义的情况, 尤其是DIV+CSS很不方便解决的问题,比如以下两种情况: 一.父元素宽度固定,想让若干个子元素平分宽度 通常的做法是手动设置子元素的宽度,如果设置百分数不一定能整除,设置具体的数值又限制了父元素的宽度固定,很烦. 可以使用display:table来解决: .parent{display: table; width: 1000px;} .

exp-00079解决方法

在exp导出表时,报错 EXP-00079: Data in table "XXX_YYY" is protected. Conventional path may only be exporting partial table. 解决方法 grant exempt access policy to xxx用户 其他方法和问题产生原因有待进一步研究 exp-00079解决方法,布布扣,bubuko.com

解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in

php 5个版本,5.2.5.3.5.4.5.5,怕跟不上时代,新的服务器直接上5.5,但是程序出现如下错误:Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in,看意思就很明了,说mysql_connect这个模块将在未来弃用,请你使用mysqli或者PDO来替代. 解决方法1: 禁止php报错

Invalid location of tag(th)

编译环境: Windows7+Ecliplse+Django 1 <table border="1"> 2 <thead> 3 <tr> 4 <th>用户名</th> 5 <th>密码</th> 6 </tr> 7 </thead> 8 <tbody> 9 10 {% for line in data %} 11 <tr> 12 <td> {{

destoon 多表联合查询时出现解析错误,parse_str函数解析错误

数据库前缀  wb_ 标签 ,调用文章时获取评论数量 <!--{php $tags=tag("table=article_24 a left join wb_comment_stat c on c.itemid=a.itemid&condition=status>2 and level=1&pagesize=3&order=hits desc&template=null");}--> 出现结果 sql语句 SELECT * FROM w

[mysql] mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in

From: http://www.ttlsa.com/php/deprecated-mysql-connect/ php 5个版本,5.2.5.3.5.4.5.5,怕跟不上时代,新的服务器直接上5.5,但是程序出现如下错误:Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in,看意思就很明了,说my

实现全屏轮播,并且轮播div中的文字盒子一直自动垂直居中

效果如下: 直接上代码了: 说明:轮播图基于swiper.js,自行下载.css在最后 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.