Hi all,
I am very new to Android and Google Maps.  I am trying to learn how to put 
a map in my app by using the below example:

https://developers.google.com/maps/documentation/android/start#specify_settings_in_the_application_manifest

When I run the example, I get the dreaded "The file has stopped 
unexpectedly" error.  The file compiles fine.  I have a feeling it is in 
the main.xml file.  Can anyone give me any ideas?

Here's the code:

main.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";

    xmlns:tools="http://schemas.android.com/tools";

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    tools:context=".MainActivity" >


<fragment xmlns:android="http://schemas.android.com/apk/res/android";

  android:id="@+id/map"

  android:layout_width="match_parent"

  android:layout_height="match_parent"

  class="com.google.android.gms.maps.MapFragment"/>


</LinearLayout>


Android manifest:


<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android";

    package="com.connectingpeoplesoftware.maptest"

    android:versionCode="1"

    android:versionName="1.0" >


    <uses-sdk android:minSdkVersion="1" android:targetSdkVersion="16" />

    

    <meta-data

    android:name="com.google.android.maps.v2.API_KEY"

    android:value="KEY NOT SHOWN BUT IS IN HERE."/>


      <permission android:name=
"com.connectingpeoplesofware.maptest.permission.MAPS_RECEIVE"

          android:protectionLevel="signature"/>

        <uses-permission android:name=
"com.connectingpeoplesofware.maptest.permission.MAPS_RECEIVE"/>

        

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

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

<uses-permission android:name=
"com.google.android.providers.gsf.permission.READ_GSERVICES"/>

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

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

        

<uses-feature

  android:glEsVersion="0x00020000"

  android:required="true"/>

    

    <application

        android:allowBackup="true"

        android:icon="@drawable/ic_launcher"

        android:label="@string/app_name"

        android:theme="@style/AppTheme" >

        <activity

            android:name="com.connectingpeoplesoftware.maptest.MainActivity"

            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>


</manifest>



-- 
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