title: NoClassDefFoundError for GooglePlayServicesUtil on android
body: <p>I want to use google cloud messeging in my android app. It worked for me however after organizing my classes in packages and cleaning my project it stopped working, I get following error : <a href="http://pastebin.com/uWgYW9fn" rel="nofollow noreferrer">http://pastebin.com/uWgYW9fn</a></p>
  
  <blockquote>
    <p>FATAL EXCEPTION: main 11-18 20:57:44.649: E/AndroidRuntime(15967):
    java.lang.NoClassDefFoundError:
    com.google.android.gms.common.GooglePlayServicesUtil 11-18
    20:57:44.649: E/AndroidRuntime(15967):<br>
    activity.MainActivity.checkPlayServices(MainActivity.java:491) 11-18
    20:57:44.649: E/AndroidRuntime(15967):<br>
    activity.MainActivity.onCreate(MainActivity.java:72) 11-18
    20:57:44.649: E/AndroidRuntime(15967):    at
    android.app.Activity.performCreate(Activity.java:5133)</p>
  </blockquote>
  
  <p>Basically I moved my activity from </p>
  
  <pre><code>myproject.android
  </code></pre>
  
  <p>to</p>
  
  <pre><code>myproject.android.activity
  </code></pre>
  
  <p>and it stopped working with the above error. For gcm setup I did the following:</p>
  
  <pre><code>1. Install Google Play services with SDK manager.
  2. Import relevant classes into my activity
  3. Added the google-play-services_lib.jar to build path
  4. added it as library project
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/cF3wv.png" alt="enter image description here"></p>
  
  <p>My project is a maven project, however there is no maven repo for the cloud messaging service. Any ideas whats wrong?</p>