I get the following exception when trying to use the Google Play Services V2 library after following the official tutorial.
java.lang.NoClassDefFoundError: com.google.android.gms.R$string
at com.google.android.gms.common.GooglePlayServicesUtil.b(Unknown Source)
at com.google.android.gms.common.GooglePlayServicesUtil.a(Unknown Source)
at com.google.android.gms.common.GooglePlayServicesUtil.getErrorDialog(Unknown Source)
Where did I go wrong?
Version 2 includes resources and must be imported as a library project. See the instructions at http://developer.android.com/google/play-services/setup.html for how to do that in various IDEs.
The resources are for GooglePlayServicesUtil.getErrorDialog(), which directs the user to install, update, enable, etc. Google Play services if it isn’t available on the device.