-1

Here is what i have in my map.xml file:

<com.google.android.maps.MapView     
            android:id="@+id/mapView"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:enabled="true"
            android:clickable="true"
            android:apiKey="0p8EoZESYekrClENQbOlN5EN16DgXv7Rx0CPTMg"            
            />

Manifest file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.apps.locid"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".LocID"
                  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=".Map"
                  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=".web_view"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <uses-library android:name="com.google.android.maps" />
    </application>
    <uses-sdk android:minSdkVersion="8" />

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



</manifest>
Muhammad Maqsoodur Rehman
  • 33,681
  • 34
  • 84
  • 124

2 Answers2

2

Nothing more in your logs (using logcat) or in the stacktrace ?

Fredrik Leijon
  • 2,792
  • 18
  • 20
  • This is what i'm getting in my logcat:11-10 15:05:15.853: ERROR/AndroidRuntime(1528): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.apps.locid/com.apps.locid.Map}: android.view.InflateException: Binary XML file line #10: Error inflating class com.google.android.maps.map – Muhammad Maqsoodur Rehman Nov 10 '10 at 10:06
  • 1
    Issue has been resolved. Forgot to extend my class to MapActivity. :D Thanks – Muhammad Maqsoodur Rehman Nov 10 '10 at 10:20
2

Did you extend the main class as MapActivity?

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

    @Override
    protected boolean isRouteDisplayed() {
        // TODO Auto-generated method stub
        return false;
    }
}
Lope Emano
  • 149
  • 1
  • 7