I had the stand-alone app that was able to show the map using the Google Maps Api. My idea was to integrate a facebook login so that an user can enter with name and pass. I did that but now I receive the following error log when trying to run the ShowTheMap activity:
07-27 15:03:32.010: ERROR/AndroidRuntime(903): java.lang.RuntimeException: Unable to start activity ComponentInfo{mark.the.map/mark.the.map.ShowTheMap}: java.lang.NullPointerException
...
07-27 15:03:32.010: ERROR/AndroidRuntime(903): at dalvik.system.NativeStart.main(Native Method)
07-27 15:03:32.010: ERROR/AndroidRuntime(903): Caused by: java.lang.NullPointerException
07-27 15:03:32.010: ERROR/AndroidRuntime(903): at mark.the.map.ShowTheMap.onCreate(ShowTheMap.java:55)
Here my ShowTheMap.java
...
public class ShowTheMap extends MapActivity
{
...
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mapView = (MapView) findViewById(R.id.mapView)
}
}
It uses facebook connect and my idea after the successful connection to start a new activity showing the map – how should be done this?
When you run the ShowTheMap as a stand-alone project it runs perfect without any error.
You are passing null argument on the 50th line MarkTheMapActivity probably where you are starting ShowTheMap.class. By your saying you say that ShowTheMap i separate stand alone application. You cant run separate activity like you did. You can move the ShowTheMap.class and start it as child activity. If you move ShowTheMap class within your current project, everything will be alright. Cheers