After update - Error:Failed to find: com.google.android.gms:play-services:5.2.8

僤鯓⒐⒋嵵緔 提交于 2019-12-18 12:13:53

问题


Gradle project sync failed.

After update the android SDK i got this error:

Error:Failed to find: com.google.android.gms:play-services:5.2.8

  • I have checked that the sdk location wich is updated is used by android studio
  • I've got Google Repository installed and Android Support Repository too all up 2 date.
  • Also i have a ANDROID_HOME local variable pointing to the sdk im actually using

回答1:


try using com.google.android.gms:play-services:5.2.08 instead of 5.2.8.

you can also look for the right version number in your services directory:

.. /android-studio/sdk/extras/google/m2repository/com/google/android/gms/play-services/




回答2:


Check your sdk extras packages, you need to install:

  • Google Play services
  • Google Repository

For me was that I didn't had the second one installed and then "---:5+" worked as described here:

https://developers.google.com/mobile-ads-sdk/docs/admob/android/quick-start




回答3:


You can now use

compile 'com.google.android.gms:play-services:6.1.11'



回答4:


I use

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

Even though it warns against it. If things go flakey after an update I'll revert back to the current version.




回答5:


I had the same problem. I solved using:

compile 'com.google.android.gms:play-services:7.0.0'



回答6:


Suggesting using Open File> Project Structure, click the "add (+)", searching for "play-service" to select the currently available version. Something like this image: http://i.stack.imgur.com/9Pv7j.jpg



来源:https://stackoverflow.com/questions/25201240/after-update-errorfailed-to-find-com-google-android-gmsplay-services5-2-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!