I am new with android developing and whenever i am trying to start this activity it crashes. I've already tried with only hello world and the intent is fine, I am thinking it might be something in the Manifest but I am not sure of how it should be formed with maps api v2. I find this problem really frustrating. Any help is much appreciated. Manifest XML:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.eriklansner.androidprojekt.alkometer"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="17" />
<permission
android:name="com.eriklansner.androidprojekt.alkometer.MAPS_RECEIVE"
android:protectionLevel="signature" />
<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.eriklansner.androidprojekt.alkometer.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action
android:name="android.intent.action.MAIN"
android:value="your_apikey" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.eriklansner.androidprojekt.alkometer.Promilleutraknaren"
android:label="@string/title_activity_promilleutraknaren" >
</activity>
<activity
android:name="com.eriklansner.androidprojekt.alkometer.Activity"
android:label="@string/title_activity_" >
</activity>
<activity
android:name="com.eriklansner.androidprojekt.alkometer.MainActivityasd"
android:label="@string/title_activity_main_activityasd" >
</activity>
<activity
android:name="com.eriklansner.androidprojekt.alkometer.Activitydos"
android:label="@string/title_activity_activitydos" >
</activity>
<activity
android:name="com.eriklansner.androidprojekt.alkometer.Gelok"
android:label="@string/title_activity_gelok" >
</activity>
<activity
android:name="com.eriklansner.androidprojekt.alkometer.UseGps"
android:label="@string/title_activity_use_gps" >
</activity>
<activity
android:name="com.eriklansner.androidprojekt.alkometer.Visasvar"
android:label="@string/title_activity_visasvar" >
</activity>
<activity
android:name="com.eriklansner.androidprojekt.alkometer.DataContentProvider"
android:label="@string/title_activity_data_content_provider" >
</activity>
<activity
android:name="com.eriklansner.androidprojekt.alkometer.ColumnSchema"
android:label="@string/title_activity_column_schema" >
</activity>
<activity
android:name="com.eriklansner.androidprojekt.alkometer.TemperatureData"
android:label="@string/title_activity_temperature_data" >
</activity>
<activity
android:name="com.eriklansner.androidprojekt.alkometer.MyActivity"
android:label="@string/title_activity_my" >
</activity>
<activity
android:name="com.eriklansner.androidprojekt.alkometer.MyPlot"
android:label="@string/title_activity_my_plot" >
</activity>
<activity
android:name="com.eriklansner.androidprojekt.alkometer.SimpleXYPlotActivity"
android:label="@string/title_activity_simple_xyplot" >
</activity>
<activity
android:name="com.eriklansner.androidprojekt.alkometer.Main"
android:label="@string/title_activity_main" >
</activity>
<activity
android:name="com.eriklansner.androidprojekt.alkometer.Alkinmatning"
android:label="@string/title_activity_alkinmatning" >
</activity>
<activity
android:name="com.eriklansner.androidprojekt.alkometer.Alk"
android:label="@string/title_activity_alk" >
</activity>
<activity
android:name="com.eriklansner.androidprojekt.alkometer.Googlemapsgps"
android:label="@string/title_activity_googlemapsgps" >
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDPaANagQvfdHSS0oFSmsrOsrr3sYVqs5E" />
<activity
android:name="com.eriklansner.androidprojekt.alkometer.trolol"
android:label="@string/title_activity_trolol" >
</activity>
<activity
android:name="com.eriklansner.androidprojekt.alkometer.Map"
android:label="@string/title_activity_map" >
</activity>
</application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="com.example.mapdemo.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" />
activity_map.xml:
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.google.android.gms.maps.MapFragment"/>
Map.java:
public class Map extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_map, menu);
return true;
}
}