开发者

What is the way in which we import Map?

开发者 https://www.devze.com 2023-02-08 03:43 出处:网络
Whenever I impo开发者_开发知识库rt com.android.maps.MapActivity it gives an error as \"cant resolve the class\".use the below link for display a map.It is one of the best example for displaying map

Whenever I impo开发者_开发知识库rt com.android.maps.MapActivity it gives an error as "cant resolve the class".


use the below link for display a map.It is one of the best example for displaying map Display a google map


You need to add the map library to your AndroidManifest.xml

<uses-library android:name="com.google.android.maps" />

And you need to select the Google API as a project build target and not the "Android Open Source Project"


I hope you have set the target to be Google-APIs-<version> for using maps, and not just Android APIs.

Since Maps are a part of Google APIs

0

精彩评论

暂无评论...
验证码 换一张
取 消