1

I'm integrating google map v2 to my android app, I'm using Eclipse with minimum SDK Version version 10. I'm using a Samsung Galaxy Ace as a test device.

I've read and done the necessary steps in this site:

http://developer.android.com/google/play-services/setup.html https://developers.google.com/maps/documentation/android/start

I've also consult this tutorials:

http://www.vogella.com/articles/AndroidGoogleMaps/article.html http://www.androidhive.info/2013/08/android-working-with-google-maps-v2/

The problem is that the google-play-service_lib seems to be not included although I have done the step Project > Properties > Android > Add: google-play-service_lib

Here is a screenshot:

enter image description here

I've tried solving this problem by doing Project > Properties > Java Build Path and adding the google-play-service_lib, but this will cause a runtime error java.lang.noclassdeffounderror: com.google.android.gms.R$styleable

Has anyone encounter this problem, and how did you solve this?

Project > Properties > Java Build Path

Marl
  • 1,492
  • 2
  • 22
  • 37
  • Must sure you are using updated Google Play lib service? – Piyush Jan 08 '14 at 10:19
  • Yep, I've update all to what's current right now – Marl Jan 08 '14 at 10:21
  • Are you getting green mark when add it to as a library project? – Piyush Jan 08 '14 at 10:22
  • Whenever I add the library project, it is green. But when I visit the Project > Properties > Android part again, it will be red. What do you think is the problem? – Marl Jan 08 '14 at 10:24
  • @Marl copy the library project to the folder where your project is then try to reference the same. check this http://stackoverflow.com/questions/17611017/importing-google-play-service-library-showing-a-red-x-next-to-this-reference-and – Raghunandan Jan 08 '14 at 10:25

3 Answers3

2

Make sure that your project code and google-play-service_lib's code are at same place otherwise it will keep fireing import error.

Kitkat
  • 77
  • 16
1

enter image description hereThe problem is because when you are importing lib project at that time you haven't copy that project in to workspace.

So finally when import it enable "Copy to Workspace" checkbox.

And after that give a reference to your project like below image.

Piyush
  • 18,895
  • 5
  • 32
  • 63
1

As you said

I add the library project, it is green. But when I visit the Project > Properties > Android part again, it will be red.

Just copy your project into your workspace or if its already copied into the workspace make sure you have also copied your Google-play-services library into your workspace otherwise it will always give you library error as it will not get the library available into your workspace.

GrIsHu
  • 29,068
  • 10
  • 64
  • 102