我实际上没有得到这个 AndroidRuntime 错误。
当我的项目崩溃时,因为我没有关闭我从中读取值的数据库。
实际上,当我的数据库访问活动打开并且我从我的编辑器获得该设备(Xoom)上的运行项目时,就会发生这种情况。
崩溃日志如下所示。
11-01 12:09:27.090: E/SQLiteDatabase(5384): close() was never explicitly called on database '/data/data/com.android.mypype/databases/ua_analytics.db'
11-01 12:09:27.090: E/SQLiteDatabase(5384): android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here
11-01 12:09:27.090: E/SQLiteDatabase(5384): at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1980)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:977)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:956)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:1021)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:734)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:221)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:149)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at com.urbanairship.analytics.EventDataManager.<init>(Unknown Source)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at com.urbanairship.analytics.Analytics.<init>(Unknown Source)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at com.urbanairship.UAirship.takeOff(Unknown Source)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at com.android.mypype.MypypeApplication.onCreate(MypypeApplication.java:93)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:968)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3598)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at android.app.ActivityThread.access$2200(ActivityThread.java:122)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1040)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at android.os.Handler.dispatchMessage(Handler.java:99)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at android.os.Looper.loop(Looper.java:132)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at android.app.ActivityThread.main(ActivityThread.java:4025)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at java.lang.reflect.Method.invokeNative(Native Method)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at java.lang.reflect.Method.invoke(Method.java:491)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
11-01 12:09:27.090: E/SQLiteDatabase(5384): at dalvik.system.NativeStart.main(Native Method)
11-01 12:09:27.090: E/AndroidRuntime(5384): FATAL EXCEPTION: main
11-01 12:09:27.090: E/AndroidRuntime(5384): java.lang.RuntimeException: Unable to create application com.android.mypype.MypypeApplication: java.lang.SecurityException: Permission Denial: opening provider com.urbanairship.UrbanAirshipProvider from ProcessRecord{40ee74e8 5384:com.android.mypype:mypype_location_service/10069} (pid=5384, uid=10069) that is not exported from uid 10122
11-01 12:09:27.090: E/AndroidRuntime(5384): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3601)
11-01 12:09:27.090: E/AndroidRuntime(5384): at android.app.ActivityThread.access$2200(ActivityThread.java:122)
11-01 12:09:27.090: E/AndroidRuntime(5384): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1040)
11-01 12:09:27.090: E/AndroidRuntime(5384): at android.os.Handler.dispatchMessage(Handler.java:99)
11-01 12:09:27.090: E/AndroidRuntime(5384): at android.os.Looper.loop(Looper.java:132)
11-01 12:09:27.090: E/AndroidRuntime(5384): at android.app.ActivityThread.main(ActivityThread.java:4025)
11-01 12:09:27.090: E/AndroidRuntime(5384): at java.lang.reflect.Method.invokeNative(Native Method)
11-01 12:09:27.090: E/AndroidRuntime(5384): at java.lang.reflect.Method.invoke(Method.java:491)
11-01 12:09:27.090: E/AndroidRuntime(5384): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
11-01 12:09:27.090: E/AndroidRuntime(5384): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
11-01 12:09:27.090: E/AndroidRuntime(5384): at dalvik.system.NativeStart.main(Native Method)
11-01 12:09:27.090: E/AndroidRuntime(5384): Caused by: java.lang.SecurityException: Permission Denial: opening provider com.urbanairship.UrbanAirshipProvider from ProcessRecord{40ee74e8 5384:com.android.mypype:mypype_location_service/10069} (pid=5384, uid=10069) that is not exported from uid 10122
11-01 12:09:27.090: E/AndroidRuntime(5384): at android.os.Parcel.readException(Parcel.java:1321)
11-01 12:09:27.090: E/AndroidRuntime(5384): at android.os.Parcel.readException(Parcel.java:1275)
11-01 12:09:27.090: E/AndroidRuntime(5384): at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:2014)
11-01 12:09:27.090: E/AndroidRuntime(5384): at android.app.ActivityThread.getProvider(ActivityThread.java:3673)
11-01 12:09:27.090: E/AndroidRuntime(5384): at android.app.ActivityThread.acquireProvider(ActivityThread.java:3698)
11-01 12:09:27.090: E/AndroidRuntime(5384): at android.app.ContextImpl$ApplicationContentResolver.acquireProvider(ContextImpl.java:1565)
11-01 12:09:27.090: E/AndroidRuntime(5384): at android.content.ContentResolver.acquireProvider(ContentResolver.java:909)
11-01 12:09:27.090: E/AndroidRuntime(5384): at android.content.ContentResolver.query(ContentResolver.java:296)
11-01 12:09:27.090: E/AndroidRuntime(5384): at com.urbanairship.UrbanAirshipResolver.query(Unknown Source)
11-01 12:09:27.090: E/AndroidRuntime(5384): at com.urbanairship.PreferencesResolver.get(Unknown Source)
11-01 12:09:27.090: E/AndroidRuntime(5384): at com.urbanairship.Preferences.getPreferenceFromDatabase(Unknown Source)
11-01 12:09:27.090: E/AndroidRuntime(5384): at com.urbanairship.Preferences.getPreference(Unknown Source)
11-01 12:09:27.090: E/AndroidRuntime(5384): at com.urbanairship.Preferences.getInt(Unknown Source)
11-01 12:09:27.090: E/AndroidRuntime(5384): at com.urbanairship.analytics.AnalyticsPreferences.getMaxBatchSize(Unknown Source)
11-01 12:09:27.090: E/AndroidRuntime(5384): at com.urbanairship.analytics.EventUploadManager.loadPrefs(Unknown Source)
11-01 12:09:27.090: E/AndroidRuntime(5384): at com.urbanairship.analytics.EventUploadManager.<init>(Unknown Source)
11-01 12:09:27.090: E/AndroidRuntime(5384): at com.urbanairship.analytics.Analytics.<init>(Unknown Source)
11-01 12:09:27.090: E/AndroidRuntime(5384): at com.urbanairship.UAirship.takeOff(Unknown Source)
11-01 12:09:27.090: E/AndroidRuntime(5384): at com.android.mypype.MypypeApplication.onCreate(MypypeApplication.java:93)
11-01 12:09:27.090: E/AndroidRuntime(5384): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:968)
11-01 12:09:27.090: E/AndroidRuntime(5384): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3598)
11-01 12:09:27.090: E/AndroidRuntime(5384): ... 10 more
任何帮助将不胜感激..