简体   繁体   English

Android Studio导入Google Play服务项目刷新失败

[英]Android Studio import Google Play Services project refresh failed

currently I'm trying to import the Google Play Services for my Android project which is created using Android Studio. 目前我正在尝试为使用Android Studio创建的Android项目导入Google Play服务。 Now, I read the part where I should start from here and since this one is still using Eclipse I ended up in these steps. 现在,我阅读了应该从这里开始的部分,因为这个部分仍在使用Eclipse,所以我最终完成了这些步骤。 Now upon adding the Google Play Services on my app I receive an error saying: 现在,在我的应用上添加Google Play服务后,我收到一条错误消息:

Gradle 'MyApp' project refresh failed: Could not find com.google.android.gms:play-services:5.0.77. Gradle'MyApp'项目刷新失败:找不到com.google.android.gms:play-services:5.0.77。 Required by: MyApp:myapp:unspecified 要求:MyApp:myapp:未指定

So I tried changing the versions on this line: 所以我尝试更改此行的版本:

compile 'com.google.android.gms:play-services:5.0.77' 编译'com.google.android.gms:play-services:5.0.77'

into: 成:

compile 'com.google.android.gms:play-services:5.0.+',
compile 'com.google.android.gms:play-services:4+', 
compile 'com.google.android.gms:play-services:4.0.+',

so on but still getting the same error (only the version changes). 所以,但仍然得到相同的错误(只有版本更改)。

As for reference my Android Studio Version is currently @ 0.5.2 (I cant update yet) Grade ver 0.9.+. 至于参考我的Android Studio版本目前是@ 0.5.2(我还无法更新)等级版本0.9。+。

And the screenshot of my installed packages in Android SDK Manager: 以及Android SDK Manager中安装的软件包的屏幕截图:

在此输入图像描述

Now I'm wondering where exactly my problem is. 现在我想知道我的问题究竟在哪里。 And additionally I don't want to download a JAR file of the Google Play Services to solve this. 此外,我不想下载Google Play服务的JAR文件来解决此问题。 I want to stick on the official way for implementing this in Android Studio. 我想坚持在Android Studio中实现此功能的官方方式。 :D :d

从SDKManager安装Google Repository 。如果找不到Google Repository ,请从“工具”部分更新SDK ToolsSDK Platform ToolsSDK Build Tools

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

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