Add Google API to existing eclipse project

10,726

Solution 1

Since you have already downloaded the Google APIs for the version that you are developing for, example Android 4. all you have to do is:

Right click on your project -> Go to Properties -> Then Android - > Then select the Google APIs at API level 14

Solution 2

Try this simple thing. In your file which you need the google maps api which extends 'Activity', replace Activity with MapActivity. It should have a red line showing error on your code. hover mouse over it and click on the option 'Fix Project Setup'. you will then find an option that suggests you to import Google APIs. select it, and you are done. Let me know if that works.

Share:
10,726
Mario Dennis
Author by

Mario Dennis

Updated on June 29, 2022

Comments

  • Mario Dennis
    Mario Dennis almost 2 years

    I am writing an android app that will use Google Maps but to implement this I need the Google API. When I downloaded the android platform sdk (example android 4.0) I did not download the Google API cause did not know that I would need it to implement this feature.However, I went back and downloaded it. How do I add it to my existing project. Did some searching and all showed how to start a new project with the API but not how to add it to the existing project.