Failed to import com.google.android.maps.MapActivity

I am trying to import com.google.android.maps.MapActivity , but my program cannot recognize it. I also have <uses-library android:name="com.google.android.maps" /> and install apiKey in my project.

Can someone explain why I can import the above line? Thanks in advance.

+7
source share
2 answers

What version of Android are you using? In your Settings project, make sure you use the project build object containing the google api. These are usually the names of the Google APIs.

I included an image of the project settings. Select the one which says "Google APIs". They should include the needed packages.

+11
source

Right-click in your project and select Properties, then select Android> Google API from Google Inc. version 2.2 or higher. Be sure to select any of the Google APIs, not the Android 2.2 API or higher, since only the Google API has the android.maps library.

+7
source

All Articles