简体   繁体   English

使用Google Play服务时Android出现问题

[英]Android wear error when using google play service

I am using Android Studio 0.8.0 and created a project with Android Wear 4.4. 我正在使用Android Studio 0.8.0并使用Android Wear 4.4创建了一个项目。 I need to integrate it with Google Play Services. 我需要将其与Google Play服务集成。 However, I got error as follows: 但是,我得到的错误如下:

Caused by: java.lang.IllegalStateException: Unable to find dynamic class com.google.android.gms.maps.internal.CreatorImpl

I already added the play-services-wearable library in my build.gradle file. 我已经在build.gradle文件中添加了play-services-wearable库。 Also, I added following code in my AndroidManifest.xml file 另外,我在AndroidManifest.xml文件中添加了以下代码

<meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />

but the error is still. 但错误仍然存​​在。

According to the guide in http://developer.android.com/google/play-services/setup.html , I also added the Proguard Exception in my /proguard-project.txt. 根据http://developer.android.com/google/play-services/setup.html中的指南,我还在/proguard-project.txt中添加了Proguard Exception。

However, it does not work. 但是,它不起作用。

Could you give any idea to solve this problem? 你能解释一下这个问题吗? Thanks! 谢谢!

Be sure to include: 一定要包括:

compile 'com.google.android.gms:play-services-wearable:+'

in your dependencies. 在您的依赖项中。

So it would be (on the wear project): 所以它(在磨损项目上):

dependencies { compile 'com.google.android.gms:play-services-wearable:+' compile 'com.google.android.support:wearable:+' } and in the mobile project: dependencies { compile 'com.google.android.gms:play-services-wearable:+' compile 'com.google.android.support:wearable:+' }和移动项目:

dependencies { compile 'com.google.android.gms:play-services-wearable:+' wearApp project(':wear') }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM