Unable to start activity componentInfo

  • Antworten:2
JulK
  • Forum-Beiträge: 52

16.10.2012, 12:21:04 via Website

Hey Leute,

ich spiele zurzeit ein bisschen mit Google Maps herum.

Es hat alles perfekt funktioniert, bis ich einen mapController hinzugefügt habe bzw mit dem mapView was mache.

Hier mal der Code:

1package com.example.childtis_v1;
2
3import android.os.Bundle;
4import com.google.android.maps.*;
5import com.google.android.maps.MapActivity;
6import com.google.android.maps.MapView;
7
8
9public class ShowMap extends MapActivity{
10
11MapView mapView;
12private MapController mc;
13GeoPoint p;
14
15
16
17 public void onCreate(Bundle savedInstanceState) {
18 super.onCreate(savedInstanceState);
19 setContentView(R.layout.show_map);
20
21 // mapView.setSatellite(true);
22 // mc = mapView.getController();
23
24 }
25
26
27 @Override
28 protected boolean isRouteDisplayed() {
29 return false;
30 }
31
32}

Durch die zwei auskommentierten Zeilen bekomme ich dann den Fehler "Unable to start activity componentInfo"

Ich hoffe ihr könnt mir schnell auf die Sprünge helfen:)

Lg Julian

Antworten
JulK
  • Forum-Beiträge: 52

16.10.2012, 13:10:37 via Website

Danke aber habs schon gelöst;)

1mapView = (MapView) findViewById(R.id.mapview);

Antworten