0

Im trying to create my first Google Map app and so i'm following this tutorial: check_Tutorial there you will see the following imports:

import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;

My problem is when i get to this point i can not add these imports because when i type them they don't appear as if they even exist!! so that's why i can not continue with my map and i've tried so many times with other tutorials they always appear in order the maps works...

If you know the reason why i can not add these imports please let me know 'cause is driving me crazy!!

Error adding the library! I forgot to tell you that i receive this image a couple of sec after having added the google play services library: ver imagen

Alejo_Blue
  • 603
  • 3
  • 12
  • 25

3 Answers3

1

Please install Google Play Service in your device from Google play store.

and also include libraries in your project.

In Eclipse: File->Import-> Android-> Existing Android Code into Workspace->Browse-> adt->sdk->extras->google->google_play_services->lib Project.

Click OK, Remember to check option to import libs into workspace.

add the libraries to the project. Clean the Project and Run.

Anchit Mittal
  • 3,412
  • 4
  • 28
  • 48
  • Thank u very much for replying so quickly but i omitted to write that i had added that library already. But thanks a lot anyway! – Alejo_Blue Dec 20 '13 at 05:42
0

You need to reference google play services library project in your android project.

Follow the steps @

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

If using eclipse IDE check this

Importing google-play-service library showing a red X next to this reference android

Community
  • 1
  • 1
Raghunandan
  • 132,755
  • 26
  • 225
  • 256
  • Thanks for sharing your knowledge but i had added that libray already but thanks man!! (Y) – Alejo_Blue Dec 20 '13 at 06:08
  • @Alejo_Blue my second link is no different from the accepted answer. as you posted its a broken link path hence the red x you see. the second link tell you exactly how to fix it. – Raghunandan Dec 20 '13 at 07:51
  • Yeah you're right Raghunandan, but i didn't noticed you had posted that link i guess it's cause it's posted after the accepted answer... thanks a lot man anyway!! – Alejo_Blue Dec 21 '13 at 04:52
  • @Alejo_Blue nope i posted it long before anyone answered. You din't notice it. I posted it even before you posted the snap shot. – Raghunandan Dec 21 '13 at 04:53
0

Reason not import(package) google map library in your project
1)You are not selected Android build Target as google API
->Your project right click properties select as google apis
2)You are not added google play service lib in your project(as Is Library) ->Your project right click properties select as google apis.

Install in your device-
https://play.google.com/store/apps/details?id=com.google.android.gms

Sanket990
  • 665
  • 1
  • 10
  • 22
  • I guess you are right. So i did as you said: i click on properties and added the library and click apply and selected android build target as google api. But then when i come back to check it, i get the following (check the new image i just download to my original question please!) – Alejo_Blue Dec 20 '13 at 05:44
  • I think google play service lib is not same eclipse workspace. so you have to import google play service lib in import option (Checkbox Copy project in workspace.. Importing option ) – Sanket990 Dec 20 '13 at 05:56
  • Thanks a lot man!! man i love you!! i have been trying to figured that problem out! gracias papito!! en seiro!! ypu 've save my life and my grade!! it works!! – Alejo_Blue Dec 20 '13 at 06:03