Reputation: 2231
I try to import com.google.android.maps.MapActivity but my program can not recognize it. I also have <uses-library android:name="com.google.android.maps" />
and set the apiKey in my project.
Can anybody explain why I can import the above line? Thanks in advance.
Upvotes: 7
Views: 18685
Reputation: 103
Right click in your project and select Properties, then select Android > Google APIs from Google Inc. version 2.2 or above. Be sure to choose any of the Google APIs instead of the Android 2.2 or above APIs since only Google APIs have the android.maps library.
Upvotes: 7
Reputation: 2361
What Android Version to you use ? On your project Settings make sure that you use a Project Build Target that contains the google api. Normally they are names "Google APIs".
I included an image of the project settings.
Upvotes: 11