java.lang.noclassdeffounderror: com.google.android.gms.R$styleable

If you are using Intellij Idea,

  1. Select your project from project panel
  2. Hit F4 in order to open the project structure window
  3. Select Modules from left panel, then hit + button then select "import module" and navigate to "ANDROID-SDK"/extras/google/google_play_services/libproject/google-play-services_lib. By doing this this project will be added to Modules alongside with your project
  4. Select your project, then select "Dependencies" (it's a Tab) from right panel. Click + button then "3 Module dependencies..." and select "google-play-services_lib".
  5. Click + button again then "1 jars or directories..." and navigate to "/libs" folder in the above path and select "google-play-services.jar".
  6. Click ok and close project structure window.

Note: Make sure you have not added "google-play-services_lib" project as library in "Libraries" (left panel under Modules). If you have, you can go to "Libraries and simply remove it. Google Play Library Should Not Appear In Libraries.

Note 2: You can copy the whole google-play-services_lib directory to your own project if you wish to have it in version control or similar.


What you have to do is include a Google Play Services library to your project. Google has very good instructions here:

  • http://developer.android.com/google/play-services/setup.html

Also, there is a quick start which I found very useful while trying to get Google Maps v2 to work.

  • https://docs.google.com/document/pub?id=19nQzvKP-CVLd7_VrpwnHfl-AE9fjbJySowONZZtNHzw