Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

数据库报错 #75

Open
1843163412 opened this issue Feb 1, 2019 · 2 comments
Open

数据库报错 #75

1843163412 opened this issue Feb 1, 2019 · 2 comments

Comments

@1843163412
Copy link

Process: com.liaoying.yjb, PID: 8599
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.liaoying.yjb/com.liaoying.yjb.activity.MainActivity}: android.database.sqlite.SQLiteException: no such table: cities (code 1): , while compiling: select * from cities
#################################################################
Error Code : 1 (SQLITE_ERROR)
Caused By : SQL(query) error or missing database.
(no such table: cities (code 1): , while compiling: select * from cities)
#################################################################
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3320)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3416)
at android.app.ActivityThread.access$1100(ActivityThread.java:229)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:7410)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: android.database.sqlite.SQLiteException: no such table: cities (code 1): , while compiling: select * from cities
#################################################################
Error Code : 1 (SQLITE_ERROR)
Caused By : SQL(query) error or missing database.
(no such table: cities (code 1): , while compiling: select * from cities)
#################################################################
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)

@Kwanloyal
Copy link

这是什么问题啊老哥 db文件已经放到assets目录下了

@Kwanloyal
Copy link

卸载重装可以了O(∩_∩)O哈哈~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants