DroidForums.net is the original Verizon Android Forum! Registered Users do not see these ads. Please Register - It's Free!
Results 1 to 2 of 2

Thread: Map API - activity crashes on launch

  1. UNEXPECTED62's Avatar
    Member #
    20557
    Join Date
    Dec 2009
    Posts
    34
    Phone
    Motorola Droid
    #1

    Question Map API - activity crashes on launch

    Hi,

    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 com.google.android.maps.MapActivity, and imports that same thing as well. I also import com.google.android.maps.MapView, and android.os.Bundle. What is strange to me is that com.google.android.maps.MapActivity 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:
    <LinearLayout  xmlns:android="http://schemas.android.com/apk/res/android"
                    android:id = "@+id/show_on_map"
                    android:orientation="vertical"
                    android:layout_width="310dip"
                    android:layout_height="240dip"
                    android:layout_below = "@+id/location_box"
                >
                    <com.google.android.maps.MapView 
                        android:id="@+id/mapview1"
                        android:layout_width="fill_parent" 
                        android:layout_height="fill_parent" 
                        android:enabled="true" 
                        android:clickable="true" 
                         android:apiKey="0QgcCar5Krn4WHy3D3XIIOtCXu8UkYTFR3XYNug" 
                    /> 
                </LinearLayout>
    My Android Manifest has these uses-permissions above the <application> tag:

    Code:
     <uses-permission  android:name="android.permission.ACCESS_COARSE_LOCATION"/>
        <uses-permission  android:name="android.permission.ACCESS_FINE_LOCATION" />
        <uses-permission android:name="android.permission.INTERNET"  />
    And again in the manifest I have

    Code:
    <uses-library android:name="com.google.android.maps"  />
    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 Force Close on launch?
  2. Droid Newbie
    Vmad's Avatar
    Member #
    140442
    Join Date
    Nov 2010
    Posts
    1
    Phone
    Enter Current Phone Model Here
    #2

    hi UNEXPECTED62

    I am also having a similar issue ,
    Please let me know if you have figured out the problem or have a work around for that .

    --
    VMad

Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. Replies: 2
    Last Post: 03-25-2011, 06:40 PM
  2. Random Function Activity While AC Charging
    By starlighter20 in forum Android Tech Support
    Replies: 4
    Last Post: 01-24-2010, 01:35 PM
  3. Activity Dialer error
    By kms1325 in forum Android General Discussions
    Replies: 0
    Last Post: 01-17-2010, 06:08 PM
  4. Any app to track how many hr/min spent in a app or doing an activity?
    By TheCyclist in forum Android General Discussions
    Replies: 2
    Last Post: 12-15-2009, 05:24 PM
  5. TROUBLESHOOTING: Activity Phone Dialer Not Responding
    By cgarnes in forum Motorola Droid
    Replies: 6
    Last Post: 12-02-2009, 12:40 PM

Search tags for this page

activity crashes when i relaunch on android
,
android embed map view
,

android google maps keeps crashing

,
android google maps searching crash
,
android mapview crash
,
google map api android crash
,

google maps android keeps crashing

,
google maps crash android
,

google maps keeps crashing android

,
maps api android crash
Click on a term to search our site for related topics.

Tags for this Thread

Find us on Google+