Could not find: com.google.android.gms:play-services-*:9.8.00 - android

I am using com.google.android.gms:play-services-*:9.8.00 for GCM and ads service in gradle. Previously it works fine, but currently its not working.
It's showing below error now when build the apk:
Could not find: com.google.android.gms:play-services-*:9.8.00

You need to specify the services name, in your case it should be this two line in your build.gradle file
compile 'com.google.android.gms:play-services-gcm:9.8.0'
compile 'com.google.android.gms:play-services-ads:9.8.0'
And if you want to include all play-services (not recommended!)
compile 'com.google.android.gms:play-services:9.8.0'

Make sure the Google Repository and its related repostories has been updated to the latest version. Check by going to the SDK Manager -> Extras Section.

They switched from '... .00' to '... .0' - just remove the last '0'

Related

How I can resolve gradle sync issue on Android Studio 2.0?

enter image description here
I've installed it as it is directed in the pic, but it never seems to be resolved.
I'd be on cloud nine, if somebody could help me with this.
These are the correct version that you can add in your build.gradle according to the API needs.
API 22:
compile 'com.android.support:appcompat-v7:22.0.0'
API 23:
compile 'com.android.support:appcompat-v7:23.2.0'
According to your problem in your gradle file you must put below line,
compile 'com.android.support:appcompat-v7:23.2.0'
Click on blue link as and update your sdk...when you will update it, it again gives you error (to update gradle version) so again click on error link then finally Android Studio will work perfectly.

Where can i download Googles android package? (Not the apps)

Where can i download the jar file for com.android.support packages such as com.android.support:appcompat-v7 or com.android.support:design ?
I looked at mavenCentral and jCenter but there was nothing there.
EDIT:
probably get wasn't the right word to use. i want to download them and use them offline.
YOu can get it from gradle. If you are using Android Studio just go to build.gradle and add the following under depedencies
compile 'com.android.support:design:23.2.1'
compile 'com.android.support:appcompat-v7:23.2.1'

Android studio build gradle sync failed

I am trying to add google play service to my project but it gives me error when I try to edit build (Gradle).
How can I fix it?
In your configuration there some issues.
You are using the wrong build.gradle file.
It is your top-level file.
You should add this line in your app/build.gradle
There is a typo. You are missing the ' at the end of the line compile.
Use an updated version.
For example use:
apply plugin: 'com.android.application'
...
dependencies {
compile 'com.google.android.gms:play-services:8.1.0'
}
Finally refer this official doc for more info.
In versions of Google Play services prior to 6.5, you had to compile the entire package of APIs into your app. In some cases, doing so made it more difficult to keep the number of methods in your app (including framework APIs, library methods, and your own code) under the 65,536 limit.
For example if you need to make only your app aware of location updates add
compile 'com.google.android.gms:play-services-location:8.1.0' only in gradle or if you need only map choose compile 'com.google.android.gms:play-services-maps:8.1.0'.
Please replace
compile 'com.google.android.gms:play-services:3.1.36
with
compile 'com.google.android.gms:play-services:3.1.36'
One thing you can try is Right Click on app open module settings on Dependencies Tab click '+' icon and add there 'com.google.android.gms:play-services:8.1.0' and click search icon and add that dependency,
So i don't want to elaborate what you had done wrong as my colleagues figured it out.I like to say, while playing with Google Play Service
Selectively compile APIs into your executable
In versions of Google Play services prior to 6.5, you had to compile the entire package of APIs into your app. In some cases, doing so made it more difficult to keep the number of methods in your app (including framework APIs, library methods, and your own code) under the 65,536 limit.
For example if you need to make only your app aware of location
updates add compile
'com.google.android.gms:play-services-location:8.1.0' only in gradle
or if you need only map choose compile
'com.google.android.gms:play-services-maps:8.1.0'.
Thank you.
Visit for more.

How can I determine the version of Google Play services?

I am migrating from Eclipse to Android Studio. I have a project that I imported into Android Studio that uses Google Play Services, so I am following the documentation I found here: http://developer.android.com/google/play-services/setup.html
This documentation says that I need to edit my build.gradle file. They give the example:
apply plugin: 'com.android.application'
...
dependencies {
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.google.android.gms:play-services:6.5.87'
}
Also the documentation mentions, "Be sure you update this version number each time Google Play services is updated.", which I assume is 6.5.87 in the above example. So how do I determine the "version" Google Play Services I have installed with my Android SDK manager. Here is a screen shot of my android sdk:
So my Android SDK Manager tells me I have installed "Revision" so what do I put in my build.gradle file?
compile 'com.google.android.gms:play-services:6.5.22'
... or maybe ...
compile 'com.google.android.gms:play-services:22'
Any help appreciated!
UPDATE: Thank you for all your answers.
I was able to find the version like so:
Leila001#win8 ~/Windows_Home/AppData/Local/Android/android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/res/values
$ cat version.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="google_play_services_version">6587000</integer>
</resources>
You have the right idea by checking to make sure you do not have any updates.
The easiest way to check is simply when you have the latest downloaded in the Android SDK(locally).
I am using Mac OSX:
~/android-sdk/extras/google/m2repository/com/google/android/gms/play-services/
If you look where you have YOUR-ANDROID-SDK/extras/google/m2repository/com/google/android/gms/play-services/, you will see all the versions downloaded that you have.
The latest one being 6.5.87. (compile 'com.google.android.gms:play-services:6.5.87')
For you, the directory path on Windows would be:
C:\Users\Leila001\AppData\Local\Android\extras\google\m2repository\com\google\android\gms\play-services
You can see which version you have in project structure - dependecies - click on plus in right cornner - libary dependencies
and just add it to build.gradle with click or manually:
compile 'com.google.android.gms:play-services:6.5.87'

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

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 which is updated is used by Android Studio
I've got Google Repository installed and Android Support Repository too all up to date.
Also I have a ANDROID_HOME local variable pointing to the sdk I'm actually using
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/
Check your sdk extras packages, you need to install:
Google Play services
Google Repository
For me, the thing was that I didn't have the second one installed and then "---:5+" worked
as described here:
https://developers.google.com/mobile-ads-sdk/docs/admob/android/quick-start
You can now use
compile 'com.google.android.gms:play-services:6.1.11'
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.
I had the same problem. I solved using:
compile 'com.google.android.gms:play-services:7.0.0'
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

Categories

Resources