我得到以下信息:
Java.Lang.NullPointerException:监听器不能为空。
似乎无法摆脱它。我已经用尽了我能找到的所有可能的解决方案。
using System;
using Android.App;
using Android.Gms.Location;
using Android.Gms.Common.Apis;
using Android.OS;
using Android.Gms.Maps.Model;
using Android.Widget;
using Android.Locations;
using Android.Gms.Common;
namespace Maps.Droid.LocationService {
public class FusedLocation : GoogleApiClient.IConnectionCallbacks, GoogleApiClient.IOnConnectionFailedListener, Android.Gms.Location.ILocationListener {
private Activity activity;
private GoogleApiClient mGoogleApiClient;
private LocationRequest mLocationRequest;
private Location currentLocation;
private bool locationAvailable = false;
public FusedLocation(Activity activity) {
this.activity = activity;
setGoogleApiClient();
setLocationRequest();
//var requestBuilder = new LocationSettingsRequest.Builder().AddLocationRequest(mLocationRequest);
//requestBuilder.SetAlwaysShow(true);
// Next check whether the current location settings are satisfied:
//var result = LocationServices.SettingsApi.CheckLocationSettings(mGoogleApiClient, requestBuilder.Build());
}
private void setGoogleApiClient() {
if (mGoogleApiClient == null) {
mGoogleApiClient = new GoogleApiClient.Builder(activity)
.AddConnectionCallbacks(this)
.AddOnConnectionFailedListener(this)
.AddApi(LocationServices.API)
.Build();
}
}
private void setLocationRequest() {
if (mLocationRequest == null) {
mLocationRequest = new LocationRequest();
mLocationRequest.SetInterval(LocationTracker.MIN_TIME_BW_UPDATES);
mLocationRequest.SetFastestInterval(LocationTracker.MIN_TIME_BW_UPDATES / 2);
mLocationRequest.SetPriority(LocationRequest.PriorityHighAccuracy);
}
}
public LatLng getLatLng() {
return new LatLng(currentLocation.Latitude, currentLocation.Longitude);
}
public double getLatitude() {
return currentLocation == null ? 0.0 : currentLocation.Latitude;
}
public double getLongitude() {
return currentLocation == null ? 0.0 : currentLocation.Longitude;
}
public void startLocationServices() {
if (!mGoogleApiClient.IsConnected) {
mGoogleApiClient.Connect();
LocationServices.FusedLocationApi.RequestLocationUpdates(mGoogleApiClient, mLocationRequest, this);
}
}
public void pauseLocationServices() {
// Stop location updates to save battery, but don't disconnect the GoogleApiClient object.
if (mGoogleApiClient.IsConnected) {
LocationServices.FusedLocationApi.RemoveLocationUpdates(mGoogleApiClient, this);
}
}
public void stopLocationServices() {
// only stop if it's connected, otherwise we crash
if (mGoogleApiClient != null) {
mGoogleApiClient.Disconnect();
}
}
public bool canGetLocation() {
return locationAvailable;
}
public void OnConnected(Bundle connectionHint) {
// Get last known recent location. If the user launches the activity,
// moves to a new location, and then changes the device orientation, the original location
// is displayed as the activity is re-created.
if (currentLocation == null) {
currentLocation = LocationServices.FusedLocationApi.GetLastLocation(mGoogleApiClient);
}
locationAvailable = true;
// Begin polling for new location updates.
startLocationUpdates();
}
// Trigger new location updates at interval
protected void startLocationUpdates() {
setGoogleApiClient(); // The method checks if it has been already initialized
setLocationRequest(); // The method checks if it has been already initialized
// Request location updates
LocationServices.FusedLocationApi.RequestLocationUpdates(mGoogleApiClient, mLocationRequest, this);
}
public void OnConnectionSuspended(int cause) {
// GoogleApiClient will automatically attempt to restore the connection.
// Applications should disable UI components that require the service, and wait for a call to onConnected(Bundle) to re-enable them
if (cause == GoogleApiClient.ConnectionCallbacks.CauseServiceDisconnected) {
Toast.MakeText(activity, "Location Services disconnected. Please re-connect.", ToastLength.Long).Show();
} else if (cause == GoogleApiClient.ConnectionCallbacks.CauseNetworkLost) {
Toast.MakeText(activity, "Network lost. Please re-connect.", ToastLength.Long).Show();
}
}
public void OnLocationChanged(Location location) {
currentLocation = location;
}
public void OnConnectionFailed(ConnectionResult result) {
if (mGoogleApiClient != null) {
mGoogleApiClient.Connect();
}
}
public IntPtr Handle {
get;
}
public void Dispose() {
}
}
}
看来问题出在方法上setGoogleApiClient();
检查此图像:
发现错误后我点击继续:
08-12 16:09:14.446 D/OpenGLRenderer(13084): Enabling debug mode 0
08-12 16:09:15.176 D/Mono (13084): Assembly Ref addref Maps.Droid[0x64b8c7f8] -> Xamarin.GooglePlayServices.Maps[0x64bdfe50]: 2
08-12 16:09:15.176 D/Mono (13084): Assembly Ref addref Maps.Droid[0x64b8c7f8] -> Xamarin.GooglePlayServices.Basement[0x64bde280]: 2
08-12 16:09:15.176 D/Mono (13084): Assembly Ref addref Maps.Droid[0x64b8c7f8] -> Xamarin.GooglePlayServices.Location[0x64bdf070]: 2
08-12 16:09:15.206 D/Mono (13084): Assembly Ref addref Xamarin.GooglePlayServices.Location[0x64bdf070] -> Xamarin.GooglePlayServices.Basement[0x64bde280]: 3
08-12 16:09:15.206 D/Mono (13084): Assembly Ref addref Maps.Droid[0x64b8c7f8] -> Xamarin.GooglePlayServices.Base[0x64bdd490]: 2
08-12 16:09:15.206 D/Mono (13084): Assembly Ref addref Xamarin.GooglePlayServices.Base[0x64bdd490] -> Xamarin.GooglePlayServices.Basement[0x64bde280]: 4
08-12 16:09:15.216 I/dalvikvm(13084): Could not find method android.content.pm.PackageManager.getPackageInstaller, referenced from method com.google.android.gms.common.zze.zzi
08-12 16:09:15.216 W/dalvikvm(13084): VFY: unable to resolve virtual method 404: Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
08-12 16:09:15.216 D/dalvikvm(13084): VFY: replacing opcode 0x6e at 0x000b
08-12 16:09:15.216 D/Mono (13084): DllImport searching in: '__Internal' ('(null)').
08-12 16:09:15.216 D/Mono (13084): Searching for 'java_interop_jnienv_call_static_object_method'.
08-12 16:09:15.216 D/Mono (13084): Probing 'java_interop_jnienv_call_static_object_method'.
08-12 16:09:15.216 D/Mono (13084): Found as 'java_interop_jnienv_call_static_object_method'.
08-12 16:09:15.226 D/Mono (13084): DllImport searching in: '__Internal' ('(null)').
08-12 16:09:15.226 D/Mono (13084): Searching for 'java_interop_jnienv_call_int_method_a'.
08-12 16:09:15.226 D/Mono (13084): Probing 'java_interop_jnienv_call_int_method_a'.
08-12 16:09:15.226 D/Mono (13084): Found as 'java_interop_jnienv_call_int_method_a'.
08-12 16:09:15.336 D/Mono (13084): DllImport attempting to load: '/system/lib/liblog.so'.
08-12 16:09:15.336 D/Mono (13084): DllImport loaded library '/system/lib/liblog.so'.
08-12 16:09:15.336 D/Mono (13084): DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').
08-12 16:09:15.336 D/Mono (13084): Searching for '__android_log_print'.
08-12 16:09:15.336 D/Mono (13084): Probing '__android_log_print'.
08-12 16:09:15.336 D/Mono (13084): Found as '__android_log_print'.
08-12 16:09:15.336 I/mono-stdout(13084): 1
1
1
08-12 16:09:15.346 I/mono-stdout(13084): 1
2
2
08-12 16:09:15.346 I/mono-stdout(13084): 2
08-12 16:09:15.346 I/mono-stdout(13084): 2
08-12 16:09:15.346 D/Mono (13084): DllImport searching in: '__Internal' ('(null)').
08-12 16:09:15.346 D/Mono (13084): Searching for 'java_interop_jnienv_get_static_field_id'.
08-12 16:09:15.346 D/Mono (13084): Probing 'java_interop_jnienv_get_static_field_id'.
08-12 16:09:15.346 D/Mono (13084): Found as 'java_interop_jnienv_get_static_field_id'.
08-12 16:09:15.356 D/Mono (13084): DllImport searching in: '__Internal' ('(null)').
08-12 16:09:15.356 D/Mono (13084): Searching for 'java_interop_jnienv_get_static_object_field'.
08-12 16:09:15.356 D/Mono (13084): Probing 'java_interop_jnienv_get_static_object_field'.
08-12 16:09:15.356 D/Mono (13084): Found as 'java_interop_jnienv_get_static_object_field'.
Unhandled Exception:
Java.Lang.NullPointerException: Listener must not be null
08-12 16:09:17.826 D/Mono (13084): DllImport attempting to load: '/system/lib/liblog.so'.
08-12 16:09:17.826 D/Mono (13084): DllImport loaded library '/system/lib/liblog.so'.
08-12 16:09:17.826 D/Mono (13084): DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').
08-12 16:09:17.826 D/Mono (13084): Searching for '__android_log_print'.
08-12 16:09:17.826 D/Mono (13084): Probing '__android_log_print'.
08-12 16:09:17.836 D/Mono (13084): Found as '__android_log_print'.
08-12 16:09:17.856 I/MonoDroid(13084): UNHANDLED EXCEPTION:
08-12 16:09:17.866 I/MonoDroid(13084): Java.Lang.NullPointerException: Listener must not be null
08-12 16:09:17.866 I/MonoDroid(13084): at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3540/1cf254db/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
08-12 16:09:17.876 I/MonoDroid(13084): at Java.Interop.JniEnvironment+InstanceMethods.CallObjectMethod (JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00085] in /Users/builder/data/lanes/3540/1cf254db/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:11283
08-12 16:09:17.876 I/MonoDroid(13084): at Android.Runtime.JNIEnv.CallObjectMethod (IntPtr jobject, IntPtr jmethod, Android.Runtime.JValue* parms) [0x00000] in /Users/builder/data/lanes/3540/1cf254db/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:102
08-12 16:09:17.876 I/MonoDroid(13084): at Android.Gms.Common.Apis.GoogleApiClient+Builder.AddConnectionCallbacks (IConnectionCallbacks listener) [0x0004a] in <filename unknown>:0
08-12 16:09:17.876 I/MonoDroid(13084): at Maps.Droid.LocationService.FusedLocation..ctor (Android.App.Activity activity) [0x000a0] in C:\Users\Gustavo.Costa\documents\visual studio 2015\Projects\Maps\Maps\Maps.Droid\LocationService\FusedLocation.cs:38
08-12 16:09:17.876 I/MonoDroid(13084): at Maps.Droid.LocationService.LocationTracker..ctor (Android.App.Activity activity) [0x00026] in C:\Users\Gustavo.Costa\documents\visual studio 2015\Projects\Maps\Maps\Maps.Droid\LocationService\LocationTracker.cs:22
08-12 16:09:17.876 I/MonoDroid(13084): at Maps.Droid.MapActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x00015] in C:\Users\Gustavo.Costa\documents\visual studio 2015\Projects\Maps\Maps\Maps.Droid\MapActivity.cs:15
08-12 16:09:17.876 I/MonoDroid(13084): at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState) [0x00011] in /Users/builder/data/lanes/3540/1cf254db/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.App.Activity.cs:2426
08-12 16:09:17.876 I/MonoDroid(13084): at (wrapper dynamic-method) System.Object:0a7eba53-2ed2-4ace-97be-6a8e8dacad4a (intptr,intptr,intptr)
08-12 16:09:17.876 I/MonoDroid(13084): --- End of managed Java.Lang.NullPointerException stack trace ---
08-12 16:09:17.876 I/MonoDroid(13084): java.lang.NullPointerException: Listener must not be null
08-12 16:09:17.876 I/MonoDroid(13084): at com.google.android.gms.common.internal.zzx.zzb(Unknown Source)
08-12 16:09:17.876 I/MonoDroid(13084): at com.google.android.gms.common.api.GoogleApiClient$Builder.addConnectionCallbacks(Unknown Source)
08-12 16:09:17.876 I/MonoDroid(13084): at md551afeb14f78091b7dcc7953e9e497c49.MapActivity.n_onCreate(Native Method)
08-12 16:09:17.876 I/MonoDroid(13084): at md551afeb14f78091b7dcc7953e9e497c49.MapActivity.onCreate(MapActivity.java:33)
08-12 16:09:17.876 I/MonoDroid(13084): at android.app.Activity.performCreate(Activity.java:5411)
08-12 16:09:17.876 I/MonoDroid(13084): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
08-12 16:09:17.876 I/MonoDroid(13084): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2233)
08-12 16:09:17.876 I/MonoDroid(13084): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2359)
08-12 16:09:17.876 I/MonoDroid(13084): at android.app.ActivityThread.access$800(ActivityThread.java:139)
08-12 16:09:17.876 I/MonoDroid(13084): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
08-12 16:09:17.876 I/MonoDroid(13084): at android.os.Handler.dispatchMessage(Handler.java:102)
08-12 16:09:17.876 I/MonoDroid(13084): at android.os.Looper.loop(Looper.java:136)
08-12 16:09:17.876 I/MonoDroid(13084): at android.app.ActivityThread.main(ActivityThread.java:5230)
08-12 16:09:17.876 I/MonoDroid(13084): at java.lang.reflect.Method.invokeNative(Native Method)
08-12 16:09:17.876 I/MonoDroid(13084): at java.lang.reflect.Method.invoke(Method.java:515)
08-12 16:09:17.876 I/MonoDroid(13084): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:780)
08-12 16:09:17.876 I/MonoDroid(13084): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:596)
08-12 16:09:17.876 I/MonoDroid(13084): at dalvik.system.NativeStart.main(Native Method)
08-12 16:09:17.876 I/MonoDroid(13084): --- End of managed Java.Lang.NullPointerException stack trace ---
08-12 16:09:17.876 I/MonoDroid(13084): java.lang.NullPointerException: Listener must not be null
08-12 16:09:17.876 I/MonoDroid(13084): at com.google.android.gms.common.internal.zzx.zzb(Unknown Source)
08-12 16:09:17.876 I/MonoDroid(13084): at com.google.android.gms.common.api.GoogleApiClient$Builder.addConnectionCallbacks(Unknown Source)
08-12 16:09:17.876 I/MonoDroid(13084): at md551afeb14f78091b7dcc7953e9e497c49.MapActivity.n_onCreate(Native Method)
08-12 16:09:17.876 I/MonoDroid(13084): at md551afeb14f78091b7dcc7953e9e497c49.MapActivity.onCreate(MapActivity.java:33)
08-12 16:09:17.876 I/MonoDroid(13084): at android.app.Activity.performCreate(Activity.java:5411)
08-12 16:09:17.876 I/MonoDroid(13084): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
08-12 16:09:17.876 I/MonoDroid(13084): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2233)
08-12 16:09:17.876 I/MonoDroid(13084): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2359)
08-12 16:09:17.876 I/MonoDroid(13084): at android.app.ActivityThread.access$800(ActivityThread.java:139)
08-12 16:09:17.876 I/MonoDroid(13084): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
08-12 16:09:17.876 I/MonoDroid(13084): at android.os.Handler.dispatchMessage(Handler.java:102)
08-12 16:09:17.876 I/MonoDroid(13084): at android.os.Looper.loop(Looper.java:136)
08-12 16:09:17.876 I/MonoDroid(13084): at android.app.ActivityThread.main(ActivityThread.java:5230)
08-12 16:09:17.876 I/MonoDroid(13084): at java.lang.reflect.Method.invokeNative(Native Method)
08-12 16:09:17.876 I/MonoDroid(13084): at java.lang.reflect.Method.invoke(Method.java:515)
08-12 16:09:17.876 I/MonoDroid(13084): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:780)
08-12 16:09:17.886 I/MonoDroid(13084): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:596)
08-12 16:09:17.886 I/MonoDroid(13084): at dalvik.system.NativeStart.main(Native Method)
08-12 16:09:17.886 D/Mono (13084): DllImport searching in: '__Internal' ('(null)').
08-12 16:09:17.886 D/Mono (13084): Searching for 'java_interop_jnienv_throw'.
08-12 16:09:17.886 D/Mono (13084): Probing 'java_interop_jnienv_throw'.
08-12 16:09:17.886 D/Mono (13084): Found as 'java_interop_jnienv_throw'.
An unhandled exception occured.
08-12 16:09:19.416 E/mono (13084):
08-12 16:09:19.416 E/mono (13084): Unhandled Exception:
08-12 16:09:19.416 E/mono (13084): Java.Lang.NullPointerException: Listener must not be null
08-12 16:09:19.416 E/mono (13084): at (wrapper dynamic-method) System.Object:0a7eba53-2ed2-4ace-97be-6a8e8dacad4a (intptr,intptr,intptr)
08-12 16:09:19.416 E/mono (13084): at (wrapper native-to-managed) System.Object:0a7eba53-2ed2-4ace-97be-6a8e8dacad4a (intptr,intptr,intptr)
08-12 16:09:19.416 E/mono (13084): --- End of managed Java.Lang.NullPointerException stack trace ---
08-12 16:09:19.416 E/mono (13084): java.lang.NullPointerException: Listener must not be null
08-12 16:09:19.416 E/mono (13084): at com.google.android.gms.common.internal.zzx.zzb(Unknown Source)
08-12 16:09:19.416 E/mono (13084): at com.google.android.gms.common.api.GoogleApiClient$Builder.addConnectionCallbacks(Unknown Source)
08-12 16:09:19.416 E/mono (13084): at md551afeb14f78091b7dcc7953e9e497c49.MapActivity.n_onCreate(Native Method)
08-12 16:09:19.416 E/mono (13084): at md551afeb14f78091b7dcc7953e9e497c49.MapActivity.onCreate(MapActivity.java:33)
08-12 16:09:19.416 E/mono (13084): at android.app.Activity.performCreate(Activity.java:5411)
08-12 16:09:19.416 E/mono (13084): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
08-12 16:09:19.416 E/mono (13084): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2233)
08-12 16:09:19.416 E/mono (13084): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2359)
08-12 16:09:19.416 E/mono (13084): at android.app.ActivityThread.access$800(ActivityThread.java:139)
08-12 16:09:19.416 E/mono (13084): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
08-12 16:09:19.416 E/mono (13084): at android.os.Handler.dispatchMessage(Handler.java:102)
08-12 16:09:19.416 E/mono (13084): at android.os.Looper.loop(Looper.java:136)
08-12 16:09:19.416 E/mono (13084): at android.app.ActivityThread.main(ActivityThread.java:5230)
08-12 16:09:19.416 E/mono (13084): at java.lang.reflect.Method.invokeNative(Native Method)
08-12 16:09:19.416 E/mono (13084): at java.lang.reflect.Method.invoke(Method.java:515)
08-12 16:09:19.416 E/mono (13084): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:780)
08-12 16:09:19.416 E/mono (13084): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:596)
08-12 16:09:19.416 E/mono (13084): at dalvik.system.NativeStart.main(Native Method)
08-12 16:09:19.416 E/mono (13084):
08-12 16:09:19.416 E/mono (13084): --- End of managed Java.Lang.NullPointerException stack trace ---
08-12 16:09:19.416 E/mono (13084): java.lang.NullPointerException: Listener must not be null
08-12 16:09:19.416 E/mono (13084): at com.google.android.gms.common.internal.zzx.zzb(Unknown Source)
08-12 16:09:19.416 E/mono (13084): at com.google.android.gms.common.api.GoogleApiClient$Builder.addConnectionCallbacks(Unknown Source)
08-12 16:09:19.416 E/mono (13084): at md551afeb14f78091b7dcc7953e9e497c49.MapActivity.n_onCreate(Native Method)
08-12 16:09:19.416 E/mono (13084): at md551afeb14f78091b7dcc7953e9e497c49.MapActivity.onCreate(MapActivity.java:33)
08-12 16:09:19.416 E/mono (13084): at android.app.Activity.performCreate(Activity.java:5411)
08-12 16:09:19.416 E/mono (13084): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
08-12 16:09:19.416 E/mono (13084): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2233)
08-12 16:09:19.416 E/mono (13084): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2359)
08-12 16:09:19.416 E/mono (13084): at android.app.ActivityThread.access$800(ActivityThread.java:139)
08-12 16:09:19.416 E/mono (13084): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
08-12 16:09:19.416 E/mono (13084): at android.os.Handler.dispatchMessage(Handler.java:102)
08-12 16:09:19.416 E/mono (13084): at android.os.Looper.loop(Looper.java:136)
08-12 16:09:19.416 E/mono (13084): at android.app.ActivityThread.main(ActivityThread.java:5230)
08-12 16:09:19.416 E/mono (13084): at java.lang.reflect.Method.invokeNative(Native Method)
08-12 16:09:19.416 E/mono (13084): at java.lang.reflect.Method.invoke(Method.java:515)
08-12 16:09:19.416 E/mono (13084): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:780)
08-12 16:09:19.416 E/mono (13084): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:596)
08-12 16:09:19.416 E/mono (13084): at dalvik.system.NativeStart.main(Native Method)
08-12 16:09:19.416 E/mono (13084):
08-12 16:09:19.416 E/mono-rt (13084): [ERROR] FATAL UNHANDLED EXCEPTION: Java.Lang.NullPointerException: Listener must not be null
08-12 16:09:19.416 E/mono-rt (13084): at (wrapper dynamic-method) System.Object:0a7eba53-2ed2-4ace-97be-6a8e8dacad4a (intptr,intptr,intptr)
08-12 16:09:19.416 E/mono-rt (13084): at (wrapper native-to-managed) System.Object:0a7eba53-2ed2-4ace-97be-6a8e8dacad4a (intptr,intptr,intptr)
08-12 16:09:19.416 E/mono-rt (13084): --- End of managed Java.Lang.NullPointerException stack trace ---
08-12 16:09:19.416 E/mono-rt (13084): java.lang.NullPointerException: Listener must not be null
08-12 16:09:19.416 E/mono-rt (13084): at com.google.android.gms.common.internal.zzx.zzb(Unknown Source)
08-12 16:09:19.416 E/mono-rt (13084): at com.google.android.gms.common.api.GoogleApiClient$Builder.addConnectionCallbacks(Unknown Source)
08-12 16:09:19.416 E/mono-rt (13084): at md551afeb14f78091b7dcc7953e9e497c49.MapActivity.n_onCreate(Native Method)
08-12 16:09:19.416 E/mono-rt (13084): at md551afeb14f78091b7dcc7953e9e497c49.MapActivity.onCreate(MapActivity.java:33)
08-12 16:09:19.416 E/mono-rt (13084): at android.app.Activity.performCreate(Activity.java:5411)
08-12 16:09:19.416 E/mono-rt (13084): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
08-12 16:09:19.416 E/mono-rt (13084): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2233)
08-12 16:09:19.416 E/mono-rt (13084): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2359)
08-12 16:09:19.416 E/mono-rt (13084): at android.app.ActivityThread.access$800(ActivityThread.java:139)
08-12 16:09:19.416 E/mono-rt (13084): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
08-12 16:09:19.416 E/mono-rt (13084): at android.os.Handler.dispatchMessage(Handler.java:102)
08-12 16:09:19.416 E/mono-rt (13084): at android.os.Looper.loop(Looper.java:136)
08-12 16:09:19.416 E/mono-rt (13084): at android.app.ActivityThread.main(ActivityThread.java:5230)
08-12 16:09:19.416 E/mono-rt (13084): at java.lang.reflect.Method.invokeNative(Native Method)
08-12 16:09:19.416 E/mono-rt (13084): at java.lang.reflect.Method.invoke(Method.java:515)
08-12 16:09:19.416 E/mono-rt (13084): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:780)
08-12 16:09:19.416 E/mono-rt (13084): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:596)
08-12 16:09:19.416 E/mono-rt (13084): at dalvik.system.NativeStart.main(Native Method)
08-12 16:09:19.416 E/mono-rt (13084):
08-12 16:09:19.416 E/mono-rt (13084): --- End of managed Java.Lang.NullPointerException stack trace ---
08-12 16:09:19.416 E/mono-rt (13084): java.lang.NullPointerException: Listener must not be null
08-12 16:09:19.416 E/mono-rt (13084): at com.google.android.gms.common.internal.zzx.zzb(Unknown Source)
08-12 16:09:19.416 E/mono-rt (13084): at com.google.android.gms.common.api.GoogleApiClient$Builder.addConnectionCallbacks(Unknown Source)
08-12 16:09:19.416 E/mono-rt (13084): at md551afeb14f78091b7dcc7953e9e497c49.MapActivity.n_onCreate(Native Method)
08-12 16:09:19.416 E/mono-rt (13084): at md551afeb14f78091b7dcc7953e9e497c49.MapActivity.onCreate(MapActivity.java:33)
08-12 16:09:19.416 E/mono-rt (13084): at android.app.Activity.performCreate(Activity.java:5411)
08-12 16:09:19.416 E/mono-rt (13084): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
08-12 16:09:19.416 E/mono-rt (13084): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2233)
08-12 16:09:19.416 E/mono-rt (13084): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2359)
08-12 16:09:19.416 E/mono-rt (13084): at android.app.ActivityThread.access$800(ActivityThread.java:139)
08-12 16:09:19.416 E/mono-rt (13084): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
08-12 16:09:19.416 E/mono-rt (13084): at android.os.Handler.dispatchMessage(Handler.java:102)
08-12 16:09:19.416 E/mono-rt (13084): at android.os.Looper.loop(Looper.java:136)
08-12 16:09:19.416 E/mono-rt (13084): at android.app.ActivityThread.main(ActivityThread.java:5230)
08-12 16:09:19.416 E/mono-rt (13084): at java.lang.reflect.Method.invokeNative(Native Method)
08-12 16:09:19.416 E/mono-rt (13084): at java.lang.reflect.Method.invoke(Method.java:515)
08-12 16:09:19.416 E/mono-rt (13084): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:780)
08-12 16:09:19.416 E/mono-rt (13084): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:596)
08-12 16:09:19.416 E/mono-rt (13084): at dalvik.system.NativeStart.main(Native Method)
08-12 16:09:19.416 E/mono-rt (13084):
In mgmain JNI_OnLoad