我正在使用解析推送通知服务构建应用。我正在使用我在清单中声明的自定义接收器:
<receiver android:name="com.company.appname.push.PushReceiver"
android:exported="false"
>
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.DELETE" />
<action android:name="com.parse.push.intent.OPEN" />
</intent-filter>
</receiver>
当我第一次构建和测试应用程序时,它可以工作。但是,当我做任何更改,构建应用程序并运行它(应重新安装以前的版本),我收到此错误:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.company.appname/com.company.appname.MainActivity}: java.lang.IllegalStateException: In order to use the ParsePush.subscribe or ParsePush.unsubscribe methods you must add the following to your AndroidManifest.xml:
<receiver android:name="com.parse.ParsePushBroadcastReceiver"
android:exported="false">
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.OPEN" />
<action android:name="com.parse.push.intent.DELETE" />
</intent-filter>
</receiver>
(Replace "com.parse.ParsePushBroadcastReceiver" with your own implementation if you choose to extend ParsePushBroadcastReceiver)
at android.app.Activityappname.performLaunchActivity(Activityappname.java:2416)
at android.app.Activityappname.handleLaunchActivity(Activityappname.java:2476)
at android.app.Activityappname.-wrap11(Activityappname.java)
at android.app.Activityappname$H.handleMessage(Activityappname.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.Activityappname.main(Activityappname.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.IllegalStateException: In order to use the ParsePush.subscribe or ParsePush.unsubscribe methods you must add the following to your AndroidManifest.xml:
<receiver android:name="com.parse.ParsePushBroadcastReceiver"
android:exported="false">
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.OPEN" />
<action android:name="com.parse.push.intent.DELETE" />
</intent-filter>
</receiver>
(Replace "com.parse.ParsePushBroadcastReceiver" with your own implementation if you choose to extend ParsePushBroadcastReceiver)
at com.parse.ParsePush.checkForManifestAndThrowExceptionIfNeeded(ParsePush.java:152)
at com.parse.ParsePush.subscribeInBackground(ParsePush.java:78)
at com.company.appname.api.AppnameApi.subscribeToParseChannels(AppnameApi.java:1034)
at com.company.appname.MainActivity.onStart(MainActivity.java:140)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1237)
at android.app.Activity.performStart(Activity.java:6253)
... 9 more
我需要手动卸载应用程序,并在每次进行任何更改时安装新的副本。
有人知道可能出错吗?谢谢。
Parse.com库的版本是1.8.1。
答案 0 :(得分:0)
几天前,我收到了来自parse.com的邮件说,#Parse; Parse将在2017年1月28日结束的一年后完全退休。&#34;因此,请检查您是否因此而异常,或者是否有任何其他原因,因为即使我不确定。