安全例外开放提供商Urbanairship

时间:2013-08-19 07:26:02

标签: android push-notification urbanairship.com

我不知道为什么我得到这个例外,这里是log cat:

08-19 12:19:17.840: W/System.err(2825): java.lang.SecurityException: Permission Denial: opening provider com.urbanairship.UrbanAirshipProvider from ProcessRecord{40c16f78 2825:package:location_service/10206} (pid=2825, uid=10206) that is not exported from uid 10107
08-19 12:19:17.840: W/System.err(2825):     at android.os.Parcel.readException(Parcel.java:1321)
08-19 12:19:17.840: W/System.err(2825):     at android.os.Parcel.readException(Parcel.java:1275)
08-19 12:19:17.840: W/System.err(2825):     at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:2014)
08-19 12:19:17.840: W/System.err(2825):     at android.app.ActivityThread.getProvider(ActivityThread.java:3673)
08-19 12:19:17.840: W/System.err(2825):     at android.app.ActivityThread.acquireProvider(ActivityThread.java:3698)
08-19 12:19:17.840: W/System.err(2825):     at android.app.ContextImpl$ApplicationContentResolver.acquireProvider(ContextImpl.java:1565)
08-19 12:19:17.840: W/System.err(2825):     at android.content.ContentResolver.acquireProvider(ContentResolver.java:909)
08-19 12:19:17.840: W/System.err(2825):     at android.content.ContentResolver.query(ContentResolver.java:296)
08-19 12:19:17.840: W/System.err(2825):     at com.urbanairship.UrbanAirshipResolver.query(Unknown Source)
08-19 12:19:17.840: W/System.err(2825):     at com.urbanairship.PreferencesResolver.get(Unknown Source)
08-19 12:19:17.840: W/System.err(2825):     at com.urbanairship.Preferences.getPreferenceFromDatabase(Unknown Source)
08-19 12:19:17.840: W/System.err(2825):     at com.urbanairship.Preferences.getPreference(Unknown Source)
08-19 12:19:17.840: W/System.err(2825):     at com.urbanairship.Preferences.getBoolean(Unknown Source)
08-19 12:19:17.840: W/System.err(2825):     at com.urbanairship.push.PushPreferences.isAPIDReady(Unknown Source)
08-19 12:19:17.840: W/System.err(2825):     at com.urbanairship.push.PushManager.getAPID(Unknown Source)
08-19 12:19:17.840: W/System.err(2825):     at com.urbanairship.UAirship.takeOff(Unknown Source)
08-19 12:19:17.840: W/System.err(2825):     at package.MyApplication.onCreate(MyApplication.java:157)
08-19 12:19:17.840: W/System.err(2825):     at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:968)
08-19 12:19:17.840: W/System.err(2825):     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3598)
08-19 12:19:17.840: W/System.err(2825):     at android.app.ActivityThread.access$2200(ActivityThread.java:122)
08-19 12:19:17.840: W/System.err(2825):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1040)
08-19 12:19:17.840: W/System.err(2825):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-19 12:19:17.840: W/System.err(2825):     at android.os.Looper.loop(Looper.java:132)
08-19 12:19:17.840: W/System.err(2825):     at android.app.ActivityThread.main(ActivityThread.java:4025)
08-19 12:19:17.840: W/System.err(2825):     at java.lang.reflect.Method.invokeNative(Native Method)
08-19 12:19:17.840: W/System.err(2825):     at java.lang.reflect.Method.invoke(Method.java:491)
08-19 12:19:17.840: W/System.err(2825):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
08-19 12:19:17.840: W/System.err(2825):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
08-19 12:19:17.840: W/System.err(2825):     at dalvik.system.NativeStart.main(Native Method)

重新启动设备时出现此错误。我有我的应用市场,测试了motorola Xoom。

请帮忙......

1 个答案:

答案 0 :(得分:1)

看起来您可能正在运行两个进程。如果可能的话,在一个进程中运行所有内容,因为某些Android版本中存在导致此类问题的错误。如果您绝对需要两个流程,则所有城市飞艇代码都应在单个流程(主流程)中运行,而Application.onCreate方法不应在第二个流程中调用UAirship.takeOff。