0

I am new at android programming, I am using ADT Bundle (Android Developer Tools, "eclipse+plugin SDK"), I wanted to use google maps, so I installed google_play_services from SDK manager, and when I added this line to my code

import com.google.android.gms.maps.GoogleMap; 

the next error appeared

The import "com.google" cannot be resolved 

I have already looked in the internet, and I found some propositions that didn't work, and others for the older versions of SDK (<=2013).

It talks about .jar file of google_play_services (to import it to the library) in /extras/google/google_play_services/libproject/google-play-services_lib/ that doesn't exist (libproject/google-play-services_lib/) in the SDK folder that I have, and I can't either find the .jar file.

If you have a solution, I'll really appreciate your help!

Best Regards, Maya

Juan Cruz Soler
  • 8,172
  • 5
  • 41
  • 44
  • why are you using Eclipse? Will be best for you to migrate to android studio. With android studio it is easy to configure google_play_services. – CodeDaily Jun 23 '16 at 00:34

1 Answers1

0

You cant add play lib as jar, you need to add lib as project

  1. import google-play-services_lib from android SDK support folder as an existing Android project (check "Copy projects into workspace")
  2. clean newly added google-play-services_lib project
  3. Right click on your project select properties and add library project to it
  4. Make sure play lib and project using same Andrid version and then clean your project

For more detail about steps to import play lib see Importing google-play-service library showing a red X next to this reference android

Community
  • 1
  • 1
Hitesh Sahu
  • 41,955
  • 17
  • 205
  • 154
  • The problem is I don't have google-play-services_lib folder – Kiko Maya Jun 23 '16 at 21:27
  • I have edited answer. You can find play in android-sdk-folder/extras/google/google_play_services/libproject/google-play – Hitesh Sahu Jun 24 '16 at 00:22
  • I don't have a folder named "google-play-services_lib" or "libproject" in the sdk support folder, I'm sorry I don't understand, the folders that I have are not the same since they upgraded sdk. – Kiko Maya Jun 24 '16 at 21:06