7

MapView NullPointerException in onCreate

view full story
linux-howto

http://stackoverflow.com – I am creating a MapView programmatically like this: MapView mv = new MapView(this); However this leads to a NullPointerException (see log). If I use another constructor such as MapView mv = new MapView(this, new GoogleMapOptions()); everything is fine. What is the matter? LogCat: 01-19 01:28:20.411: E/AndroidRuntime(16039): FATAL EXCEPTION: main 01-19 01:28:20.411: E/AndroidRuntime(16039): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example/com.example.ui.ListingsActivity}: java.lang.NullPointerException 01-19 01:28:20.411: E/AndroidRuntime(16039): at andr (HowTos)