1

Currently i am implementing app-indexing - auto complete feature in Unity game . I have followed all the procedure mentioned in developer site , and it is working in Android App , but in Unity it is getting crashed , with log as follows.

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/appindexing/AppIndex
Muhammad Shahzad
  • 9,340
  • 21
  • 86
  • 130

3 Answers3

2

Simply add these two lines in your dependencies of build.gradle file.... It will work for sure

compile 'com.google.android.gms:play-services-plus:8.4.0'

compile 'com.google.android.gms:play-services-appindexing:8.4.0'

viki
  • 29
  • 3
  • Can you please solve this problem i am unable to find the solution ...http://stackoverflow.com/questions/36930829/to-have-autocomplete-feature-of-app-indexing-is-it-necessary-to-publish-latest-u/37276451#37276451 – Abhinandan Dharmadhikari May 17 '16 at 12:50
1

You need to enable multidex. see details here. http://developer.android.com/tools/building/multidex.html

Ashish Rawat
  • 5,541
  • 1
  • 20
  • 17
0

i Solved this, actually this error was not in Android studio it was a Runtime error in unity project.

for this we need to include google-play-services.jar file in to Unity's Plugins/Android directory.