我正在关注此链接以打开与数据库的连接。但是,当我尝试打开它时,它会抛出一个异常,说 errorCopyingDatabase。我的数据库大小约为 20MB。是因为它没有从 Assets 文件夹复制到内存的大小还是其他一些问题。我确定我的代码很好,并且我还仔细检查了所有路径(一切似乎都很好)。我得到以下异常:
12-14 04:44:45.471: E/AndroidRuntime(512): java.lang.Error: ErrorCopyingDataBase
12-14 04:44:45.471: E/AndroidRuntime(512): at com.bondsms.db.DBHelper.createDataBase(DBHelper.java:42)
12-14 04:44:45.471: E/AndroidRuntime(512): at com.bondsms.db.DBAdapter.createDatabase(DBAdapter.java:37)
12-14 04:44:45.471: E/AndroidRuntime(512): at com.bondsms.BSGroupsActivity.loadAllGroupsFromDB(BSGroupsActivity.java:98)
12-14 04:44:45.471: E/AndroidRuntime(512): at com.bondsms.BSGroupsActivity.onCreate(BSGroupsActivity.java:55)
12-14 04:44:45.471: E/AndroidRuntime(512): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-14 04:44:45.471: E/AndroidRuntime(512): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
12-14 04:44:45.471: E/AndroidRuntime(512): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
12-14 04:44:45.471: E/AndroidRuntime(512): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
12-14 04:44:45.471: E/AndroidRuntime(512): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
12-14 04:44:45.471: E/AndroidRuntime(512): at android.os.Handler.dispatchMessage(Handler.java:99)
12-14 04:44:45.471: E/AndroidRuntime(512): at android.os.Looper.loop(Looper.java:123)
12-14 04:44:45.471: E/AndroidRuntime(512): at android.app.ActivityThread.main(ActivityThread.java:4627)
12-14 04:44:45.471: E/AndroidRuntime(512): at java.lang.reflect.Method.invokeNative(Native Method)
12-14 04:44:45.471: E/AndroidRuntime(512): at java.lang.reflect.Method.invoke(Method.java:521)
12-14 04:44:45.471: E/AndroidRuntime(512): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
12-14 04:44:45.471: E/AndroidRuntime(512): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
12-14 04:44:45.471: E/AndroidRuntime(512): at dalvik.system.NativeStart.main(Native Method)