我在我的Manifest中使用以下代码
<receiver
android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.moosejawford.activities" />
</intent-filter>
</receiver>
<service android:name=".GCMIntentService" />
以前运作良好,但从今天起我突然收到此错误,谷歌改变了什么。
请帮我解决这个问题。我没有在google中找到任何正确的答案。我只是想知道为什么会这样。
错误报告:
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.ActivityThread.access$600(ActivityThread.java:141)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.os.Handler.dispatchMessage(Handler.java:99)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.os.Looper.loop(Looper.java:137)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.ActivityThread.main(ActivityThread.java:5041)
08-26 11:30:18.031: E/AndroidRuntime(32283): at java.lang.reflect.Method.invokeNative(Native Method)
08-26 11:30:18.031: E/AndroidRuntime(32283): at java.lang.reflect.Method.invoke(Method.java:511)
08-26 11:30:18.031: E/AndroidRuntime(32283): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
08-26 11:30:18.031: E/AndroidRuntime(32283): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
08-26 11:30:18.031: E/AndroidRuntime(32283): at dalvik.system.NativeStart.main(Native Method)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.ActivityThread.startActivityNow(ActivityThread.java:2023)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:749)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.widget.TabHost.setCurrentTab(TabHost.java:413)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.widget.TabHost.addTab(TabHost.java:240)
08-26 11:30:18.031: E/AndroidRuntime(32283): at com.moosejawford.activities.Tabs.onCreate(Tabs.java:44)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.Activity.performCreate(Activity.java:5104)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
08-26 11:30:18.031: E/AndroidRuntime(32283): ... 11 more
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.ActivityThread.startActivityNow(ActivityThread.java:2023)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.Activity.performCreate(Activity.java:5104)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
08-26 11:30:18.031: E/AndroidRuntime(32283): Caused by: java.lang.IllegalStateException: No receivers for action com.google.android.c2dm.intent.REGISTRATION
08-26 11:30:18.031: E/AndroidRuntime(32283): at com.google.android.gcm.GCMRegistrar.checkReceiver(GCMRegistrar.java:169)
08-26 11:30:18.031: E/AndroidRuntime(32283): at com.google.android.gcm.GCMRegistrar.checkManifest(GCMRegistrar.java:154)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.Activity.performCreate(Activity.java:5104)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
08-26 11:30:18.031: E/AndroidRuntime(32283): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
08-26 11:30:18.031: E/AndroidRuntime(32283): ... 28 more