放在raw下的数据库确实存在的 表也在
下面是日志:
17822-17822/com.example.zwy.gaexam E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.zwy.gaexam/com.example.zwy.gaexam.activity.Layout_InOrderTo}: android.database.sqlite.SQLiteException: no such table: singleselect (code 1): , while compiling: SELECT id, title, one, two, three, four, answer FROM singleselect WHERE id>0
Caused by: android.database.sqlite.SQLiteException: no such table: singleselect (code 1): , while compiling: SELECT id, title, one, two, three, four, answer FROM singleselect WHERE id>0
这是写的一个类
ConstantInfo {
public static final String database_path = "/data/data/com.example.zwy.gaexam/databases/exam";
public static final int DBVERSION = 7;
public static final String author = "com.example.zwy.gaexam";
public static final String tablename0 = "singleselect";// 单选题目
public static final String path0 = "content://" + author + "/" + tablename0;
public static final int TABLE_TYPE0 = 1000;
public static final String INFO_TABLE_TYPE0 = "vnd.android.cursor.dir/"
+ tablename0;
public static final Uri uri0 = Uri.parse(path0);
}