1.新建一个类,继承MapActivity类,选择Google APIs
2.在AndroidManifest.xml文件中添加map库和网络访问权限
3.main.xml文件,此处的apiKey为你自己申请的key,
如何取得apiKey,请看http://blog.csdn.net/zlqqhs/article/details/8548439
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<com.google.android.maps.MapView
android:id="@+id/mapview