Ankit Garg
Ankit Garg

Reputation: 719

android - google play services 7.3.0 causes crash

I was using google play services 6.5.87 until now but I wanted to use Android place picker in my app. This requires play services version 7.0.0 and above.

I changed google play services version to 7.3.0(latest, tried 7.0.0 as well), but this started causing crash on kit kat and below devices. Following are the errors that came up:

  1. The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
  2. NoClassDefFoundError
  3. java.lang.VerfiyError

I tried googling for solution. Someone suggested changing jdk from 1.8 to 1.7(tried but didn't work). But when we change play services version from 7.x.x to 6.5.87 everything works just fine.

Somewhere I read that wear doesn't support 7.3.0 so that could be the reason. I tried specifying screen sizes, and that didn't help.

Any lead will be of immense help.

Upvotes: 1

Views: 358

Answers (1)

Ankit Garg
Ankit Garg

Reputation: 719

I think I have found the root cause for it, in your build.gradle(app) file

  1. inside defaultConfig, set multiDexEnabled flag to true (MultiDex)
  2. Put compile dependency compile 'com.android.support:multidex:1.0.0' under dependencies

Now, in your Application class, add this

@Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); MultiDex.install(this); }

This works.

Upvotes: 1

Related Questions