Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can not install google-play-services into Eclipse correctly (trying to get maps working)

My current wokspace setup looks like this:

enter image description hereenter image description here

However, people have told me that to get maps working, I also need to have "google-play-services_lib.jar" in my "Android Dependencies" folder, and the way to do that was through doing: "to Google Play Services into your project Project -> Properties -> Android -> Library, Add -> google-play-services_lib"

The only problem with that is it always after the initial green marker, it turns to a red cross when re-opening "Project -> Properties -> Android -> Library" ...and also no "google-play-services_lib.jar" gets added to "Android Dependencies" in the prooject

This question is an off-spring of this: Trying to get maps v2 Android demo working where I was told above was necessary to get maps working in my app. (Otherwise one gets error during inflating the XML containing the maps fragment.)

like image 523
Tom Avatar asked Mar 10 '13 18:03

Tom


Video Answer


1 Answers

Have you tried to use Google APIs instead of Android 4.2.2? Using that will use Google Maps dependencies.


I just made a "working app" (it throws no errors but I was too lazy to make a key) using Google Maps v2 and not Google APIs as build but Android 4.1. This was my procedure.

  1. Download the library from the SDK download manager.
  2. Copied the folder "google-play-services_lib" which had this path ".../android-sdk/extras/google/google_play_services/libproject/google-play-services_lib" to another folder where I keep my libraries.
  3. In Eclipse I chose New Project - Android Project from Existing Code. It got imported without any problems.
  4. Right click the test project, click Properties - Android - Add - google-play-services_lib which now is in my workspace.
  5. See if it works by trying to subclass com.google.android.gms.maps.MapFragment.

Please respond if you get any errors, if you do it right it will all work. Good luck.

like image 111
Simon Zettervall Avatar answered Oct 23 '22 05:10

Simon Zettervall