2

I am trying custom cordova plugin for GCM. I have included latest google-play-service.jar in project's libs folder and <meta-data android:name="com.google.android.gms.version" android:value="5089000" /> in AndroidMenifest.xml. But still facing this problem...

    E/GooglePlayServicesUtil( 2808): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
W/GooglePlayServicesUtil( 2808): Google Play services out of date.  Requires 5089000 but found 4452030

I am developing android app on phonegap. I have found this error message in console window. I supposed to follow this Install the Google Play services SDK, but did't found any build.gradle and proguard-rules.txt

Can any one tell the actual reason? How can I include google-play-service in my phonegap project in an appropriate way? Please help me. I am looking forward to hear from you soon. Thank you.

Alex Filatov
  • 2,232
  • 3
  • 32
  • 39
  • You real device to test GCM, or emulator created by google API(included google play services lib in system) – Hanh Le Aug 12 '14 at 01:29
  • I found a similar problem http://stackoverflow.com/questions/20443116/phonegap-cordova-3-2-0-the-google-play-services-resources-were-not-found But how to link google play service as a library project in phonegap(without eclipse or android studio)? –  Aug 12 '14 at 06:09
  • What kind of device you used to test app(real or emulator)? – Hanh Le Aug 13 '14 at 01:17

2 Answers2

2
 E/GooglePlayServicesUtil( 2808): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

This problem has been solved. The solution has beed found here Cordova build problems after import google play service Google play service resources were missing from my phonegap project even after adding the google-play-service.jar in libs folder. So I had to configure the phonegap project. Steps are (copied from the link)...

  1. Firstly copy the whole google-play-services_lib folder from ANDROID_SDK_PATH\extras\google\google_play_services\libproject\to your project root directory.(i.e. platform/android)
  2. copy build.xml, local.properties & project.properties files from your project_root_folder/Cordova lib folder to google-play-services_lib folder.
  3. Change the project.properties file's project target to the right target (i.e. android 19). Open the project.properties from your Project Root folder and change reference 2 like this : android.library.reference.1=CordovaLib target=android-19 android.library.reference.2=google-play-services_lib
  4. Goto the google-play-services folder in your project and run : android update project -p . (don't forget dot)
  5. Then run following commands: ant debug ant release If you get any error then first run 'ant clean debug' then follow step
  6. Now you can run cordova build android OR if you are using ionic then ionic build android.
Community
  • 1
  • 1
  • 1
    This is why developing with Cordova is like being MacGyver; you're constantly bugfixing, patching and duct taping it all together... geez. – BdR Jan 26 '15 at 22:21
  • @BdR yes Cordova needs bug fixing, patching etc but here the issue is quite different. The issue is about set up of google-play-service library and I think still this the only way you can use Google Play as a library package in PhoneGap. –  Mar 10 '15 at 14:13
  • sad that i could upvote your answer just once.. you have ended my 14 hours toil. just a question my project.properties looks something like this : target=android-22 android.library.reference.1=CordovaLib android.library.reference.2=google-play-services_lib , will it cause any problems to other cordova plugins – Raj Nandan Sharma Jul 29 '15 at 20:09
  • @Raj you are asking the same thing that I listed on the solution. You have to make the project.properties ad mentioned in the solution. This will work fine. –  Aug 03 '15 at 12:00
0

Your logcat output says you have installed an outdated version. And you are following a blogpost from March 2014, perhaps you should try the official docs.

http://developer.android.com/google/play-services/setup.html

mentat
  • 2,748
  • 1
  • 21
  • 40
  • yes logcat shows that Google Play services out of date. But I have updated my google-play-service just today and it is the latest version. Thanks for the link. –  Aug 11 '14 at 09:13