I get the following exception when trying to use the Google Play Services V2 library after following the official tutorial.
java.lang.NoClassDefFoundError: c
I also face same problem. If you run your application in emulator then may be face this error because in most of emulator there is no google playService (Play store app) installed.
So try to run your app in android device which is playService app is installed.
Solution :- add error part code in try...catch
and then try it will work in emulator also.
Note :- Google Messaging service require palyservice. otherwise throw error SERVICE_NOT_AVAILABLE
if you are using
compile 'com.google.android.gms:play-services:9.0.2'
change it to individual ones such as
compile 'com.google.android.gms:play-services-location:9.0.2'
also add
compile 'com.android.support:multidex:1.0.1'
if you have multiDexEnabled=true