[英]App-indexing Error - java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/appindexing/AppIndex
Currently i am implementing app-indexing - auto complete feature in Unity game . 目前我在Unity游戏中实现app-indexing - 自动完成功能。 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.
我已经按照开发者网站中提到的所有程序进行了操作,并且它在Android应用程序中工作,但在Unity中它正在崩溃,日志如下。
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/appindexing/AppIndex
Simply add these two lines in your dependencies of build.gradle file.... It will work for sure 只需在build.gradle文件的依赖项中添加这两行....它肯定会起作用
compile 'com.google.android.gms:play-services-plus:8.4.0' 编译'com.google.android.gms:play-services-plus:8.4.0'
compile 'com.google.android.gms:play-services-appindexing:8.4.0' 编译'com.google.android.gms:play-services-appindexing:8.4.0'
You need to enable multidex. 您需要启用multidex。 see details here.
看这里的细节。 http://developer.android.com/tools/building/multidex.html
http://developer.android.com/tools/building/multidex.html
i Solved this, actually this error was not in Android studio it was a Runtime error in unity project. 我解决了这个问题,实际上这个错误不是在Android工作室中,它是统一项目中的运行时错误。
for this we need to include google-play-services.jar file in to Unity's Plugins/Android directory. 为此,我们需要将google-play-services.jar文件包含在Unity的Plugins / Android目录中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.