Activeandroid problem no such table solution summary

Source: Internet
Author: User

 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. Simulator problem, change to real machine debugging no problem

2.<meta-data android: name="Aa_db_name" android: value= "Name.db" /> "Name.db" cannot be named for your package name, such as package name Com.sometest.app, cannot be named Sometest.db

3.


<meta-data
Android : Name= "Aa_models"
Android : value= "Com.item.android.models.MyModel" />

Add model to Mainfest.xml

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

Speeding up application startup

Activeandroid would look through all your files to find your Model classes. This process can is very slow if you had a lot of dependencies. To speed up the 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" />

Activeandroid problem no such table solution summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.