title: Android GCM registration failed. Why?
body: <p>I was trying to use GCM to have push-notification in my app. I called <code>GCMRegistrar.register(this, SENDER_ID)</code>, but I got an error.</p>
  
  <p>My manifest file:</p>
  
  <pre><code>   &lt;receiver android:name="com.google.android.gcm.GCMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="com.google.android.c2dm.intent.RECEIVE"/&gt;
              &lt;action android:name="com.google.android.c2dm.intent.REGISTRATION"/&gt;
              &lt;category android:name="com.salamworld"/&gt;
          &lt;/intent-filter&gt;
      &lt;/receiver&gt;
      &lt;service android:name=".GCMIntentService"/&gt;
  &lt;/application&gt;
  &lt;uses-permission android:name="android.permission.INTERNET"/&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/&gt;
  &lt;uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/&gt;
  &lt;uses-permission android:name="android.permission.GET_ACCOUNTS"/&gt;
  &lt;uses-permission android:name="android.permission.WAKE_LOCK"/&gt;
  &lt;permission android:name="my.package.permission.C2D_MESSAGE" android:protectionLevel="signature"/&gt;
  &lt;uses-permission android:name="my.package.permission.C2D_MESSAGE"/&gt;
  &lt;uses-sdk android:minSdkVersion="8"/&gt;
  </code></pre>
  
  <p>And here's the error:</p>
  
  <blockquote>
    <p>DEBUG/GCMBaseIntentService(423): Registration error: ACCOUNT_MISSING</p>
  </blockquote>
  
  <p>My GCMIntentService class:</p>
  
  <pre><code>public class GCMIntentService extends GCMBaseIntentService{
  
      public GCMIntentService() {
          super();
      }
  
      @Override
      protected void onMessage(Context context, Intent intent) {
      }
  
      @Override
      protected void onError(Context context, String errorId) {
      }
  
      @Override
      protected void onRegistered(Context context, String registrationId) {
          Log.d("@R@", registrationId);
      }
  
      @Override
      protected void onUnregistered(Context context, String registrationId) {
      }
  }
  </code></pre>