76

I updated the Google Play Services version from the revision 29 to 30 using the Android SDK Manager, but after updating the directory "<sdk>/extras/google/google_play_services/libproject" disappeared, leaving only the directories "docs" and " samples".

I've tried uninstall and reinstall several times but always happens to miss the directory "libproject".

Anyone had this problem with the update?

I'm using Debian Linux 8.4 (jessie) although not believe it has anything to do with the problem.

Android SDK Manager screen

google_play_services directory screen

Teivaz
  • 5,462
  • 4
  • 37
  • 75
jefferson_amarals
  • 924
  • 1
  • 7
  • 16
  • 1
    before rev 30 arrive i using rev 29 in many games and works fine, but when rev 30 arrive rev 29 not working, then i updated to rev 30 now ads working again, seems rev 29 and bellow doesn't work anymore, im using unity3d by the way – Yogi May 19 '16 at 15:43
  • @Yogi. When I do this I get a No Resource Found error on these two: '@android:style/Theme.Holo.Light.DialogWhenLarge.NoActionBar' and '@android:style/Theme.Material.Light.DialogWhenLarge.NoActionBar'. How did you overcome this issue? – Andrew S May 19 '16 at 19:46

5 Answers5

62

Looks like Google just broke down Google Play Services into multiple libraries. You'll find them in <sdk>/extras/google/m2repository/com/google/android/gms, if you also updated Google Repository through the SDK Manager.

The individual libraries are in aar format, so you'll have to extract the jar yourself, if that's what you're after.

Cigogne Eveillée
  • 2,178
  • 22
  • 36
  • 2
    How do I use these in Eclipse. I have a legacy project that broke because of this. – Andrew S May 19 '16 at 19:43
  • 14
    Here are the steps: 1. Rename .aar to .zip 2. Unzip the file 3. Create a 'libs' folder and move the classes.jar file into it 4. Import the project into Eclipse by using New -> Project -> Android Project from Existing Source Code 5. Go to the Project's properties and set the Build Target and 'Is Library' flag – Cigogne Eveillée May 19 '16 at 20:02
  • 10
    where can i find information about this? I find it ridiculous that google did this without letting people know... not to mention, they havent updated their website with this information... – Vancert Staff Jun 23 '16 at 14:55
  • 1
    @Cigogne Eveillée The classes in classes.jar file are obfuscated and its renamed, not able to import AdListener, AdRequest, InterstitialAd etc classes – Smeet Jul 12 '16 at 16:51
  • If they're not in the jar, it's just that you are looking at the wrong library. The ones you are looking for are in `play-services-ads-lite` – Cigogne Eveillée Jul 12 '16 at 20:52
  • 6
    16th july 2016 : google play services 31, no lib project and using .aar of 9.2.0, 9.2.1 both will not provide classes to import. Refer to this article if want to use updated gms-ads library and add all required project's library too inorder to let it import classes but still it will cause error inflating on com.google.android.gms.ads.AdView in XML ......... final solution revert back to 28 or 29, if you wanna still stick to Eclipse which is by far way optimized and memory friendly for Android Devs.... https://github.com/dandar3/android-google-play-services-ads – mfaisalhyder Jul 16 '16 at 18:34
  • 1
    Should I stop using Eclipse????? Are they the same classes in 9.0.0 9.0 1 9.2.1 etc or do I have to refer to them all in Add External JAR's. WHy did they change everything? – Kalininskaya Jul 19 '16 at 09:23
  • Note, the steps work, but you need to use play-services-6.5.87. Step 1: Browse to : \extras\google\m2repository\com\google\android\gms\play-services\6.5.8‌​7 Step 2: copy play-services-6.5.87.aar and change it to a .zip, then extract it somewhere (or use 7-zip to extract it to its own folder) Step 3: import this into your eclipse workbench. Right click on it and go to properties>android. Set it as a library Step 4: Go to your project's properties>android and add this library. Worked for me! Have fun. – Xebozone Jul 29 '16 at 11:58
  • http://stackoverflow.com/questions/20982533/how-to-download-older-google-play-services – Henadzi Rabkin Aug 28 '16 at 14:29
  • My solution was similar to @CigogneEveillée's comment, but the newly created jar in the newly created libs folder would not import to Eclipse. So I simply copied the jar into my projects libs folder – galaxigirl Sep 25 '16 at 08:50
  • Has anybody been able to get Rev. 33 to work? The best I can get is 29, but I need some features from a later release. – LEM Oct 20 '16 at 15:53
  • Google this action help deveper goto Apple quickly – zszen Oct 30 '16 at 16:40
  • 1
    I don't even have the path \extras\google\m2repository\ in my android-sdk folder, and I've just downloaded the latest versions of Extras and Android SDK Tools (I'm using Eclipse). This feels like it's going to become practically impossible in the future to keep up with Google code versions using Eclipse. I really don't want to go to AS. – Mr Chops Oct 31 '16 at 17:05
  • I managed to use version 10.0.1 of the Play Services library to add a banner ad to an app, but it's a bit of a PIA with the new multiple-library format since you need to determine which libs are needed. To add ads, I needed to use the libraries play-services-ads, play-services-ads-lite, play-services-base and play-services-basement, following the steps specified by @Cigogne above. – jsevy Dec 07 '16 at 17:34
  • I encountered a couple of additional glitches: 1. Getting the classes.jar libraries in the libs folders of each library to be exported to the main app; while I finally got it working, this functionality seems glitchy in Eclipse - see http://stackoverflow.com/questions/1860770/eclipse-library-bundle-fails-to-export-packages-from-some-libraries – jsevy Dec 07 '16 at 17:38
  • 2. There was a missing reference to com.google.android.gms.R$styleable, needed by the AdView class; turns out the required resource definition is in the ads-lite package, which gives a fully qualified name of com.google.android.gms.ads.lite.R$styleable, which doesn't match what the AdView class in the jar is looking for. I fixed this by copying the res/values.xml from the play-serices-ads-lite library project into the res directory of the play-services-basement project (renaming so it didn't clobber the existing values.xml). https://code.google.com/p/gmaps-api-issues/issues/detail?id=7432 – jsevy Dec 07 '16 at 17:41
  • Where to get version.xml file? (it needs for: @integer/google_play_services_version) – JavaRunner Jan 24 '17 at 10:01
45

I am working on a legacy project in Eclipse and I fixed the problem a slightly different way than the others. For me using the project from Google Play Services revision 29, had all sorts of dependency problems which I could not resolve. For example it wanted the compatibility library v4 so I imported it but even then it could not find some required resources.

However, I was able to use Revision 28 without such issues and set the minimum version of my app to be ICS. Below is a link to version 28. Download it, unzip it and extract the libproject folder to where it would normally have been prior to removal.

Import the project in Eclipse (ensure copy files is selected) the usual way and all will be fine.

https://dl-ssl.google.com/android/repository/google_play_services_8298000_r28.zip

Andrew S
  • 2,847
  • 3
  • 33
  • 50
  • 3
    Thank you, I've been 4 hours trying other solutions and this was the only one that worked. Eternally thankful :) – Barbara PM Jun 19 '16 at 09:12
  • 1
    Thank you sir! It's a shame Google's instructions don't work. – user1010160 Jul 07 '16 at 03:39
  • @Andrew S Your solution worked for me, thanks. I provided a few more details and screenshots in my answer about how I implemented the solution, in case that can help someone else: http://stackoverflow.com/questions/42979484/how-to-add-google-play-services-to-my-eclipse-adt-project/42981792. – Jaime Montoya Mar 23 '17 at 16:33
  • @Jamie_montoya I'm glad you found it useful but that question needs to be flagged as a repeat of this one. – Andrew S Mar 25 '17 at 02:45
11

For now I downgraded back to revision 29 (and worked well) using the version history available on this site: http://www.smorgasbork.com/2015/01/05/google-play-services-sdk-version-history

I believe it is possible that this is the new format that Google will provide the libs (in .aar files) up because of the description of the update:

enter image description here

The revision number 29 says "client library and sample code" and the revision number 30 says "javadocs and and sample code".

jefferson_amarals
  • 924
  • 1
  • 7
  • 16
4

The m2repository folder contains aar files used for android studio. If you look at the samples folder and open some of the sample apps project.properties file you will see that the sample apps still reference the google-play-services_lib. This is for sure to be fixed by google, I saw also people complaining about display ads problem, so maybe they will come back with an update quite soon.

  • 1
    @jefferson_amarals, maybe you are right. The reason why they potentially removed it is probably because integrating firebase can cause the 65k reference limit. Thats why we have separate API libs in first place. If you still need the lib, this guy created an eclipse lib project that integrates the jar files for new play services, and the same method can be used for other APIs too: https://github.com/dandar3/android-google-play-services-base Also, he wrote a small tutorial on how to extract needed JARs from AAR here: https://plus.google.com/112240505564011894075/posts/6zpkvmVtGhU – Sava Mikalački May 20 '16 at 14:52
4

I posted a question about this in the Google Mobile Ads SDK Developers forum. Summarizing the steps in the answer (from Veer Busani, Mobile Ads SDK Team):


We would never recommend you to rename/edit any part of the Android SDK. If you find any issues, do let us know and we would look into it. As to your Mobile Ads/Unity/Android integration, I will certainly help you. Please follow these steps if you are on Google Play Service revision 30.0 (v 9.0) -
  • Make a new project and import the Mobile Ads Unity package.
  • Copy our demo script, make a new empty GameObject and add the script as the component.
  • Right click on Assets > PlayServicesResolver folder and select Google Play Services > Resolve Client Jars.
  • There is a known issue with GMS revision 30 in Unity. To build for Android, you would need to select Assets > Plugins > Android > firebase-common-9.0.0.aar file and in the Unity Inspector, deselect Android under the Platform for Plugins sections.
  • Finally, edit the Bundle Identifier in your Player Settings and deploy your awesome project to your Android device.

This worked.

fadden
  • 51,356
  • 5
  • 116
  • 166
  • What does mobile adds have to do with mapping services? This seems a very convoluted way round if the intention is to have an application with a map. – Andrew S Aug 27 '16 at 03:51
  • 1
    @AndrewS: your comment is the only reference to "map" on this page -- neither the question nor any of the current answers are specific to mapping. This is about Google Play Services, which is required for mobile ads support (among other things). The purpose for installing GPS isn't significant... having it installed and functioning is the end goal. This answer was summarized from an official response in the support forum, so any convolutedness is due to the unfortunate post-Google-I/O rollout of the SDK. – fadden Aug 27 '16 at 14:27
  • year fair enough I suppose. I assumed this was an Android-centric question, but I suppose it applies to unity too and furthermore adds in general.. – Andrew S Aug 28 '16 at 03:10