How to import a new project in android app properly?

364 views Asked by At

I am making an android app which uses google maps api v2. I want to use the clustering features so I am following the tutorial here

http://karnshah8890.blogspot.ca/2013/04/clustering-on-google-map-v2.html

and using the android maps extension plugin

http://code.google.com/p/android-maps-extensions/

The problem is how do I import this project in my app. I tried doing file > import, then browse for the folder called android-maps-extensions then right click my project folder then click properties then add the reference to the android-maps-extensions. Right after that, I get tons of errors in my project about needing to import R. If I try that, I get other errors.

Does anyone know how to fix this?

Thanks.

2

There are 2 answers

4
kalin On

try: New->other->android->Android Project from Existing Code point to the root dir(android-maps-extensions-1.3.1) then select android-maps-extensions [finish]

this is a library project

then you need to add this library to your project: right click on your project->properties-Android-> scroll to the bottom to the Library section then hit add and select android-maps-extensions.

0
rafffael On

I had the same problem and I've found a solution:

  1. right-click on android-maps-extensions
  2. select "Android Tools / Add Support Library..."
  3. right click on your project
  4. in the Android section, remove the google-play-service library and keep only the android-maps-extensions
  5. do a clean up, and it should work