Hi,
I want to use a map in my application but I can't get it to run. It
always crashes with the following error:

Thread [<3> main] (Suspended (exception InflateException))
    ViewRoot.handleMessage(Message) line: 1716
    ViewRoot(Handler).dispatchMessage(Message) line: 99
    Looper.loop() line: 123
    ActivityThread.main(String[]) line: 4203
    Method.invokeNative(Object, Object[], Class, Class[], Class, int,
boolean) line: not available [native method]
    Method.invoke(Object, Object...) line: 521
    ZygoteInit$MethodAndArgsCaller.run() line: 791
    ZygoteInit.main(String[]) line: 549
    NativeStart.main(String[]) line: not available [native method]

Thread [<3> main] (Suspended (exception InflateException))
    ZygoteInit$MethodAndArgsCaller.run() line: 797
    ZygoteInit.main(String[]) line: 549
    NativeStart.main(String[]) line: not available [native method]


My XML file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/
android"    package="com.App" android:versionCode="1"
android:versionName="0.1">
    <uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION" />
     <uses-permission android:name="android.permission.INTERNET" />
      <uses-permission android:name="android.permission.ACCESS_GPS" />
      <uses-permission
android:name="android.permission.ACCESS_LOCATION" />
     <uses-permission
android:name="android.permission.ACCESS_ASSISTED_GPS" />
      <uses-permission
android:name="android.permission.ACCESS_CELL_ID" />
    <application android:icon="@drawable/icon" android:label="@string/
app_name">
        <uses-library android:name="com.google.android.maps" />
        <activity android:name=".App"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
    <uses-sdk android:minSdkVersion="3" />

My layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android";
  android:orientation="vertical"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent">

  <com.google.android.maps.MapView
        android:id="@+id/myMapView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:apiKey="my_debug_key"
    />
</LinearLayout>


In my code I add the map like this: myMapView = (MapView) findViewById
(R.id.myMapView);

Anyone knows where the problem is?

Thank you
Stephan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to