答案 0 :(得分:2)
您需要同时检查发件人ID和API ID。之后你必须检查android Manifest文件,如下所示
<permission
android:name="your packagename.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="your package name.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<receiver
android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<!-- Receives the actual messages. -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<!-- Receives the registration id. -->
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="your package name" />
</intent-filter>
</receiver>
<service android:name="your package name.GCMIntentService" />