MapsActivity not beeing found

Posted by Johnny Rottenweed on Stack Overflow See other posts from Stack Overflow or by Johnny Rottenweed
Published on 2012-12-10T16:58:37Z Indexed on 2012/12/10 17:03 UTC
Read the original article Hit count: 148

Filed under:

I am trying to get a simple map displayed.

This is what I have:

package com.chance.squat;

import com.chance.squat.R;
import com.google.android.maps.MapActivity;
import android.os.Bundle;

public class Maps extends MapActivity 
{    
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.maps);
    }

    @Override
    protected boolean isRouteDisplayed() {
        return false;
    }
}

<?xml version="1.0" encoding="utf-8"?>
<com.google.android.maps.MapView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mapview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:clickable="true"
    android:apiKey="A2:D9:A5:1C:21:6F:D7:44:47:23:31:EC:1A:98:EF:36"
/>

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.chance.squat"
      android:versionCode="1"
      android:versionName="1.0">

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

        <activity android:name=".MyApp"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity android:name="com.chance.squat.Search"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

            </intent-filter>
        </activity>

        <activity android:name="com.chance.squat.Add"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

            </intent-filter>
        </activity>
       <activity android:name="com.chance.squat.About"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

            </intent-filter>
        </activity>



    </application>

    <uses-permission android:name="android.permission.INTERNET"/>

</manifest> 

I also have downloaded the Google APIs for version 8 and have set to build against them. My problem is it doesn't seem to find import com.google.android.maps.MapActivity and I don't know why or what the next step is.

Can anyone help?

© Stack Overflow or respective owner

Related posts about android