Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix Google Play Services 2 Library install to Eclipse

I've tried to follow https://developer.android.com/google/play-services/setup.html instructions in Eclipse for Mobile Developers (Juno), but am getting multiple errors with the library package after importing the library project into my workspace. I fixed the AndroidManifest.xml error it reported, but now I can't open the project in Eclipse saying the .project description file contains invalid information. So much for a simple install. I've tried uninstalling it, redownloading it, and I still get the multiple errors. Any suggesions how to get it working?

like image 887
Hoopestr Avatar asked Jan 03 '13 16:01

Hoopestr


2 Answers

There is a misleading step in step 3 of http://developer.android.com/google/play-services/setup.html:

Copy the /extras/google/google_play_services/libproject/google-play-services_lib library project into the source tree where you maintain your Android app projects.

If you are using Eclipse, import the library project into your workspace. Click File > Import, select Android > Existing Android Code into Workspace, and browse to the copy of the library project to import it.

Don't do the first copy. Instead just do the second part and check the box that says "Copy projects into workspace". I found that if I did the first part I would end up with empty xml files.

like image 121
charles young Avatar answered Oct 20 '22 04:10

charles young


Try the following :

https://developers.google.com/maps/documentation/android/intro#sample_code

You would get errors while opening an activity mentioned in the sample code. That is because android.support.v4.app.FragmentActivity is not added to your build path. Hover over the error and click on "Fix Project Setup". It would ask you to add the lib to the build path. Say Yes and enjoy :)

like image 1
lokoko Avatar answered Oct 20 '22 06:10

lokoko