views:

30

answers:

0

Hi,

I am trying to add a map into my app but it constantly force closes. I have tried some test code and the intent works fine I have followed the HelloGoogleMaps tutorial and created a api key logged the activity in manifest. I have also set permissions in manifest 4 internet ang maps but it still force closes when i select map;

  public class Locate extends MapActivity {

 @Override
 protected boolean isRouteDisplayed() {

 return false;

 }@Override

 public void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.map1);

     MapView mapView = (MapView) findViewById(R.id.mapview);
     mapView.setBuiltInZoomControls(true);
 }
}
    <?xml version="1.0" encoding="utf-8"?>
<com.google.android.maps.MapView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mapview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:clickable="true"
    android:apiKey="0LS3OJmbJ5RibfFMzB1iKtVYfta9SuU5eEXr-HQ"

xml:

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

<com.google.android.maps.MapView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mapview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:clickable="true"
    android:apiKey="0LS3OJmbJ5RibfFMzB1iKtVYfta9SuU5eEXr-HQ"
/>`<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.ff.org"
      android:versionCode="1"
      android:versionName="1.0">
    <uses-library android:name="com.google.android.maps" />
       <uses-permission android:name="android.permission.INTERNET" />
        <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
           <activity android:name=".Tabs"
                  android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

Debug Logcat LOcated Here:

Blockquote

thanks in advance