谷歌地图 - 安卓应用程序 & 谷歌地图 :



我得到了这个类

public class GoogleMapActivity extends MapActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_map);
    }
}

和我得到一个错误的编辑器- "MapActivity不能被解析为一个类型"

本教程说我必须扩展这个特殊的类。

我提到我在manifest中指定了我需要这样的google地图库

 <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <uses-library android:name="com.google.android.maps"/>

通过选择Google API SDK确保您已经创建了您的项目。如果没有,那么看看这个教程,我们如何创建Android谷歌地图应用程序:

http://www.androidhive.info/2012/01/android-working-with-google-maps/

相关内容

最新更新