This, to me, sounds pretty strange, but two of my application dealing with database work perfectly fine on any other handset (on all I could check), but doesn't work on HTC Inspire 4G provided by AT&T in the USA. Its running Android 2.2
The phone doesn't allow installation of third-party non-market apps thus I always have to install it through market to test, and whenever the application is run, database exception (SQLiteException
) is thrown.
maincat
saying that it wasn't found, while I know its there.
In the app, the data is being provided in raw
folder and is then copied to the internal folder when the app runs for the first time.
I am just pulling my hair off thinking where the problem may be, but I just fail to find it.
Interestingly, one of the app was an update to an older app. the older version of the app works just fine on the same device, but not the one that I edited.
I swear I never touched any of the database handling mechanism :PDid anyone else al开发者_JS百科so suffer from something similar?
Please help..If you've used the example that was available on the internet for coping the DB from a resource the code had a bug that was answered on this post.
you'll need to add in the RED lines that close out the database prior to the copy
Funny thing is most phones the code runs fine. But others will throw the table not found SQLiteException
here is the link: post on Anddev
精彩评论