Using Map API - crashes on launch

Last Updated:


    UNEXPECTED62 Member This Topic's Starter

    Jan 31, 2010
    Likes Received:

    I am using the Android Map API for the first time to embed a map in my application. I have done a lot of searching and most tutorials line up, and I have followed everything as far as I can tell very accurately, but still when my activity with the map launches, it crashes instantly.

    My class with the map is not my main class, it launches when a button is pressed. Initially the app is fine, and when I hit the button that starts my activity with the map, it crashes. Lets call that activity, "MoreInfo".

    So, my "More Info" extends, and imports that same thing as well. I also import, and android.os.Bundle. What is strange to me is that and MapView are yellow underlined, saying they are not used. This is technically true because I have nothing interacting with them programatically as of yet.

    The MoreInfo.xml fine for the GUI, has this LinearLayout embedded into a RelativeLayout

    Code (Text):
    1. <LinearLayout xmlns:android=""
    2.                 android:id = "@+id/show_on_map"
    3.                 android:orientation="vertical"
    4.                 android:layout_width="310dip"
    5.                 android:layout_height="240dip"
    6.                 android:layout_below = "@+id/location_box"
    7.             >
    8.                 <
    9.                     android:id="@+id/mapview1"
    10.                     android:layout_width="fill_parent"
    11.                     android:layout_height="fill_parent"
    12.                     android:enabled="true"
    13.                     android:clickable="true"
    14.                     android:apiKey="0QgcCar5Krn4WHy3D3XIIOtCXu8UkYTFR3XYNug"
    15.                 />
    16.             </LinearLayout>
    My Android Manifest has these uses-permissions above the <application> tag:

    Code (Text):
    1.  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    2.     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    3.     <uses-permission android:name="android.permission.INTERNET" />
    And again in the manifest I have

    Code (Text):
    1. <uses-library android:name="" />
    inside of the <application> tag.

    I got my API key correctly, I think my XML is ok, I imported everything correctly, I have the API checked in the project properties, and my Manifest looks good...

    Why does my app's MoreInfo crash on launch?


Share This Page