数据库处理采空工作在Android 2.2.1(Desire HD的1.72.405.3) [英] Database handling stoped working on Android 2.2.1 (Desire HD 1.72.405.3)

查看:93
本文介绍了数据库处理采空工作在Android 2.2.1(Desire HD的1.72.405.3)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某种原因在本文不上的HTC Desire HD的工作后,得到了OTA升级到2.2.1(1.72.405.3)。它工作在Desire HD的更新之前,我已经无法重现运行2.1,2.2在实际设备上的错误,以及在模拟器中运行的所有版本。

For some reason the database handling solution described in this article doesn't work on the HTC Desire HD after it got the OTA update to 2.2.1 (1.72.405.3). It worked on Desire HD before the update and I've failed to reproduce the error on actual devices running 2.1, 2.2 as well as in emulator running all versions.

不幸的是,你不能创建一个AVD为模拟器运行Android 2.2.1,我已经尝试了基于​​2.2.1(我有一个根深蒂固的普通的HTC Desire)ROM,但我的应用程序的工作原理没有问题就可以了为好。所以,问题是如果它使用了Android SDK在某些方面它不应该是突然引起的问题?

Unfortunately you can't created a AVD for emulator running Android 2.2.1 and I've tried a ROM based on 2.2.1 (I have a rooted ordinary HTC Desire) but my application works without problem on it as well. So the question is if it's using the Android SDK in some way it shouldn't that all of a sudden cause the problem?

我知道这是一个很具体的问题,但因为比我更多的开发商报告的问题,以及事实,你不能创建一个AVD我希望这个问题被接受,我希望有人有什么线索可能会导致问题。

I know this is a very specific issue but since more developers than me reporting the problem as well as the fact that you can't create an AVD I hope the question is accepted and I hope someone have a clue what might causing the problem.

下面是用户发送到我的电子市场帐户堆栈跟踪:

Here's a stack trace sent to my Market account by user:

Caused by: android.database.sqlite.SQLiteDiskIOException: disk I/O error
at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:2049)
at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1917)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:889)
at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:168)
at com.MyApp.DataBaseHelper.createDataBase(DataBaseHelper.java:81)
at com.MyApp.InitialActivity.onCreate(InitialActivity.java:33)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2797)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1066)  

相关方法,可以在引擎收录找到。由于只有一个超级链接可以包含的链接可在下面的评论中找到。需要注意的是线81堆栈跟踪发现的是10号线在引擎收录。

Related methods can be found at pastebin. Since only one hyperlink can be included link could be found in comments below. Note that line 81 found in stack trace is line 10 at pastebin.

推荐答案

我终于似乎已经得到了我的应用程序工作在Android 2.2.1上Desire HD的。我还没有机会上调试亲自尝试一下究竟是什么导致了问题。

I finally seem to have got my app to work on Android 2.2.1 on Desire HD. I haven’t had the chance to debug on it personally to try out exactly what’s causing the problem.

这突然出现了一个想法是很难codeD路径数据库文件所在的位置。 DB_PATH =/数据/数据​​/ YOUR_PACKAGE /数据库/;

One thought that popped up is the hard coded path to where the database file is located. DB_PATH = "/data/data/YOUR_PACKAGE/databases/";

我想这是可能的,这条道路是不是在Android 2.2.1 Desire HD的有效。我交换这个路径: Environment.getDataDirectory()+/数据/ YOUR_PACKAGE /数据库/+ DB_NAME;

I guess it is possible that this path isn’t valid on Android 2.2.1 for Desire HD. I exchanged this path with: Environment.getDataDirectory() + "/data/YOUR_PACKAGE/databases/" + DB_NAME;

我会尽力针点的问题,当我有机会测试自己的实际电话。如果有人测试此解决方案,请让我知道,如果它解决它。

I’ll try to pin point the issue when I had the chance to test on the actual phone myself. If anyone test this solution, please let me know if it solves it.

这篇关于数据库处理采空工作在Android 2.2.1(Desire HD的1.72.405.3)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆