NoClassDefFoundError at Google Play Services V2 library

后端 未结 8 1240
無奈伤痛
無奈伤痛 2020-11-28 11:27

I get the following exception when trying to use the Google Play Services V2 library after following the official tutorial.

java.lang.NoClassDefFoundError: c         


        
相关标签:
8条回答
  • 2020-11-28 12:31

    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

    0 讨论(0)
  • 2020-11-28 12:32

    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

    0 讨论(0)
提交回复
热议问题