java.lang.noclassdeffounderror: com.google.android.gms.R$styleable
If you are using Intellij Idea,
- Select your project from project panel
- Hit F4 in order to open the project structure window
- 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
- 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".
- Click + button again then "1 jars or directories..." and navigate to "/libs" folder in the above path and select "google-play-services.jar".
- 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