title: Cannot resolve com.google.android.gcm.GCMBaseIntentService; Android studio
body: <p><strong>Edit: I solved this problem:)</strong>
  Cause of this error :</p>
  
  <ol>
  <li>In the tutorial Implementing GCM Client , there was <a href="https://github.com/google/gcm" rel="nofollow">link</a> to download full source code for demo.</li>
  <li>Downloaded for reference , added google_play_service library in build.gradle.</li>
  <li>Did some recommended changes like SENDER_ID,SERVER_URL,.. etc</li>
  <li>Synch the project with gradle and got this error.</li>
  </ol>
  
  <p>How I solved!</p>
  
  <ol>
  <li>After lot of google I found that this class is not in google_play_service library but it is in gcm.jar which is deprecated now.
  I dont know why google has given link to old code and explained latest code in the document.</li>
  <li>Then I include the gcm.jar</li>
  <li>And the error gone, got push notification:)</li>
  </ol>
  
  <p>Hope this will help to someone who got in this trouble!</p>
  
  <p><strong>My Old Question</strong></p>
  
  <p>I am new to android studio. I dont understand build.gradle. Today I was implementing gcm-demo-client following instructions given here <a href="https://developer.android.com/google/gcm/client.html" rel="nofollow">https://developer.android.com/google/gcm/client.html</a> 
  But when I import it from suggested <a href="https://code.google.com/p/gcm/" rel="nofollow">open source code</a> I got below errors.</p>
  
  <pre><code>/home/shani/Desktop/gcm-76908409d9d5/samples/gcm-demo-client1/app/src/main/java/com/google/android/gcm/demo/app/GCMIntentService.java:28: error: cannot find symbol
  import com.google.android.gcm.GCMBaseIntentService;
                               ^
    symbol:   class GCMBaseIntentService
    location: package com.google.android.gcm
  </code></pre>
  
  <p>also there are other 25 errors. After some search on Google I found that it is because I had not added google play service library in build.gradle.</p>
  
  <p>Then I added library:
  Below is my build.gradle file</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 21
      buildToolsVersion "21.1.2"
  
      defaultConfig {
          applicationId "com.google.android.gcm.demo.app"
          minSdkVersion 8
          targetSdkVersion 16
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
          }
          dependencies {
              compile "com.google.android.gms:play-services:3.1.+"
          }
      }
  }
  </code></pre>
  
  <p>Now when I click on sync now link I got Build Success. But when I try to run on real device above error comes. I dont know what I am doing wrong. Please give me the solution, I really spend two days implementing gcm demo app. </p>