No Such table in API 2.2

ぃ、小莉子 提交于 2019-12-06 08:59:10

I had a similar issue, however the issue turned out not be related to the database but rather memory usage in the app. Older 2.3 devices understandably have less memory on them as well and depending on the environment users are running their devices on, your app may come up against memory constraints.

If I read the comments properly, you're coping a bundled sqlite db from your assets folder, if you can't reproduce the issue, it may be because your users don't have enough RAM available to your app or even have enough disk space to copy your DB.

largeHeap in your manifest only works on Android 3.0+ I believe so even if you have that set it won't solve the problem for older phones. I know the conventional wisdom is that Android app have 40mb of heap space initially, but my research suggests that this is a recommended size and not guaranteed, I've come across pre-honeycomb devices (sony in particular) that have as little as 20MB available to them.

In short, I suspect this is a memory issue and not one with the database. Try to come up with an alternate lighter weight strategy for 2.3 and below devices and see if the problem continues.

You can try to change extension of you database to mp3 to avoid compression problems. Read this for further info. This behavior changes since 2.3 so it looks like it could help

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!