マップにGoogleマップマーカーを追加する際に助けが必要です。マップに自分のモバイルデバイスの現在の位置を表示し、マーカーを使用して位置を表示したいと考えています。GoogleマップAndroidでヌルリファレンスを与えるマーカー
私の問題は、私のデバイスの現在の位置を表示するためのコードは、私が以前に他のプロジェクトで使用していたものと全く同じです。問題なく動作しますが、ここで使用すると、私の問題。
ここに私のコードとLogcatからの情報です。
コード:
private void displayLocation() {
try
{
// check if permission are granted
if (ActivityCompat.checkSelfPermission(this,Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED &&
ActivityCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED)
{
return;
}
mLastLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);
if(mLastLocation != null)
{
final double latitude = mLastLocation.getLatitude();
final double longitude = mLastLocation.getLongitude();
// update to the firebase database
geoFire.setLocation(FirebaseAuth.getInstance().getCurrentUser().getUid(), new GeoLocation(latitude, longitude), new GeoFire.CompletionListener(){
@Override
public void onComplete(String key, DatabaseError error) {
// add marker to the map
if(mUserMarker != null)
{
mUserMarker.remove(); // removes the already existing marker
}
mUserMarker = mMap.addMarker(new MarkerOptions()
.position(new LatLng(latitude,longitude))
.title("You are here"));
// move the map camera to the current location of the user
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude,longitude),15.0f));
}
});
Log.d("location Updates",String.format("Your location was changed :%f/%f",latitude,longitude));
}
else
{
Log.d("Location Error","Cannot get your current location");
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
Logcat:
12-22 05:00:53.580 32403-32603/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser V/FA: Session started, time: 16168691 12-22 05:00:53.580 32403-32603/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/FA: Logging event (FE): session_start(_s), Bundle[{firebase_event_origin(_o)=auto, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=1529463756370892487}] 12-22 05:00:53.590 32403-32603/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser V/FA: Using measurement service 12-22 05:00:53.590 32403-32603/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser V/FA: Connecting to remote service 12-22 05:00:53.600 32403-32603/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/FA: Connected to remote service 12-22 05:00:53.600 32403-32603/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser V/FA: Processing queued up service tasks: 1 12-22 05:00:55.850 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/ViewRootImpl: ViewPostImeInputStage processPointer 0 12-22 05:00:55.960 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/ViewRootImpl: ViewPostImeInputStage processPointer 1 12-22 05:00:55.970 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/ViewRootImpl: #3 mView = null 12-22 05:00:56.000 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser E/Qmage: isQIO : stream is not a QIO file 12-22 05:00:56.000 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/TextView: setTypeface with style : 0 12-22 05:00:56.030 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/ViewRootImpl: #1 mView = com.android.internal.policy.PhoneWindow$DecorView{cb08adf V.E...... R.....I. 0,0-0,0} 12-22 05:00:56.070 32403-32656/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000, [878x327]-format:1 12-22 05:00:56.080 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser E/ViewRootImpl: sendUserActionEvent() mView == null 12-22 05:00:56.110 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/ViewRootImpl: MSG_RESIZED_REPORT: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1 12-22 05:00:56.140 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/ViewRootImpl: MSG_RESIZED: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1 12-22 05:00:57.400 32403-32419/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/FirebaseAuth: Notifying id token listeners about user (KHgHwTAdSvWBqpmiJwuyZGCoTy62). 12-22 05:00:57.400 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/FirebaseApp: Notifying auth state listeners. 12-22 05:00:57.400 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/FirebaseApp: Notified 1 auth state listeners. 12-22 05:00:57.420 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/ViewRootImpl: #3 mView = null 12-22 05:00:57.430 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/Timeline: Timeline: Activity_launch_request id:bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser time:16172541 12-22 05:00:57.460 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser E/ViewRootImpl: sendUserActionEvent() mView == null 12-22 05:00:57.460 32403-32603/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser V/FA: Recording user engagement, ms: 13826 12-22 05:00:57.460 32403-32603/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser V/FA: Activity paused, time: 16172571 12-22 05:00:57.460 32403-32603/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/FA: Logging event (FE): user_engagement(_e), Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=13826, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=1529463756370892487}] 12-22 05:00:57.500 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser V/FA: onActivityCreated 12-22 05:00:57.660 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/zzbx: Making Creator dynamically 12-22 05:00:57.740 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser W/ResourcesManager: Resource getTopLevelResources for package com.google.android.gmsoverlayDirs =Null 12-22 05:00:57.820 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/Google Maps Android API: Google Play services client version: 11020000 12-22 05:00:57.830 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/Google Maps Android API: Google Play services package version: 11951440 12-22 05:00:58.230 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser E/Qmage: isQIO : stream is not a QIO file 12-22 05:00:58.240 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/AbsListView: Get MotionRecognitionManager 12-22 05:00:58.240 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser E/MotionRecognitionManager: mSContextService = [email protected] 12-22 05:00:58.250 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser E/MotionRecognitionManager: motionService = [email protected]6f647a8 12-22 05:00:58.250 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser E/MotionRecognitionManager: motionService = [email protected]6f647a8 12-22 05:00:58.300 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser W/System.err: mkdir failed: EEXIST (File exists) : /storage/emulated/0/Android/data/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser/cache/debug 12-22 05:00:58.300 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser W/System.err: mkdir failed: EEXIST (File exists) : /storage/emulated/0/Android/data/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser/cache 12-22 05:00:58.310 32403-969/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:58.320 32403-969/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:58.350 32403-969/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Tagging socket 89 with tag 3000110100000000{805310721,0} uid -1, pid: 32403, getuid(): 10197 12-22 05:00:58.400 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/TextView: setTypeface with style : 0 12-22 05:00:58.410 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/TextView: setTypeface with style : 0 12-22 05:00:58.540 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/TextView: setTypeface with style : 0 12-22 05:00:58.540 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/TextView: setTypeface with style : 0 12-22 05:00:58.550 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/TextView: setTypeface with style : 0 12-22 05:00:58.550 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/TextView: setTypeface with style : 0 12-22 05:00:58.600 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/Location Error: Cannot get your current location 12-22 05:00:58.600 32403-32603/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser V/FA: Activity resumed, time: 16173714 12-22 05:00:58.600 32403-32603/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/FA: Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_previous_class(_pc)=MainActivity, firebase_previous_id(_pi)=1529463756370892487, firebase_screen_class(_sc)=Home, firebase_screen_id(_si)=1529463756370892488}] 12-22 05:00:58.610 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/SecWifiDisplayUtil: Metadata value : SecSettings2 12-22 05:00:58.610 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/ViewRootImpl: #1 mView = com.android.internal.policy.PhoneWindow$DecorView{e53d5b2 I.E...... R.....ID 0,0-0,0} 12-22 05:00:58.610 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/Choreographer: Skipped 67 frames! The application may be doing too much work on its main thread. 12-22 05:00:58.670 32403-32656/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000, [1080x1920]-format:1 12-22 05:00:58.680 32403-969/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Tagging socket 108 with tag 3000110100000000{805310721,0} uid -1, pid: 32403, getuid(): 10197 12-22 05:00:58.720 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/TextView: setTypeface with style : 0 12-22 05:00:58.750 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/TextView: setTypeface with style : 0 12-22 05:00:58.760 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/TextView: setTypeface with style : 0 12-22 05:00:58.770 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/TextView: setTypeface with style : 0 12-22 05:00:58.780 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/TextView: setTypeface with style : 0 12-22 05:00:58.790 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/TextView: setTypeface with style : 0 12-22 05:00:58.790 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/TextView: setTypeface with style : 0 12-22 05:00:58.810 32403-992/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/libEGL: eglInitialize EGLDisplay = 0x7f89604ea8 12-22 05:00:58.820 32403-992/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000, [1080x1773]-format:2 12-22 05:00:58.850 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser W/art: Before Android 4.1, method int android.support.v7.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView 12-22 05:00:58.860 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/ViewRootImpl: MSG_RESIZED_REPORT: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1 12-22 05:00:58.950 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/location Updates: Your location was changed :-24,721872/31,223932 12-22 05:00:58.960 32403-969/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Untagging socket 89 12-22 05:00:58.970 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/location Updates: Your location was changed :-24,721872/31,223932 12-22 05:00:58.980 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/Timeline: Timeline: Activity_idle id: [email protected] time:16174090 12-22 05:00:58.990 32403-970/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.000 32403-970/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.000 32403-970/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Tagging socket 89 with tag 3000110100000000{805310721,0} uid -1, pid: 32403, getuid(): 10197 12-22 05:00:59.010 32403-972/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.010 32403-972/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.020 32403-971/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.020 32403-971/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.020 32403-972/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Tagging socket 60 with tag 3000110100000000{805310721,0} uid -1, pid: 32403, getuid(): 10197 12-22 05:00:59.020 32403-971/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Tagging socket 59 with tag 3000110100000000{805310721,0} uid -1, pid: 32403, getuid(): 10197 12-22 05:00:59.030 32403-969/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.030 32403-969/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.030 32403-969/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Tagging socket 77 with tag 3000110100000000{805310721,0} uid -1, pid: 32403, getuid(): 10197 12-22 05:00:59.100 32403-971/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Tagging socket 114 with tag 3000110100000000{805310721,0} uid -1, pid: 32403, getuid(): 10197 12-22 05:00:59.110 32403-972/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Tagging socket 51 with tag 3000110100000000{805310721,0} uid -1, pid: 32403, getuid(): 10197 12-22 05:00:59.110 32403-32656/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/libEGL: eglInitialize EGLDisplay = 0x7f960f9f08 12-22 05:00:59.120 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/ViewRootImpl: #3 mView = null 12-22 05:00:59.130 32403-969/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Tagging socket 47 with tag 3000110100000000{805310721,0} uid -1, pid: 32403, getuid(): 10197 12-22 05:00:59.170 32403-32656/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/libEGL: eglInitialize EGLDisplay = 0x7f960f9f08 12-22 05:00:59.210 32403-32656/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/libEGL: eglInitialize EGLDisplay = 0x7f960f9f08 12-22 05:00:59.240 32403-970/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Untagging socket 89 12-22 05:00:59.240 32403-970/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.240 32403-970/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.240 32403-970/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Tagging socket 89 with tag 3000110100000000{805310721,0} uid -1, pid: 32403, getuid(): 10197 12-22 05:00:59.260 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/AndroidRuntime: Shutting down VM 12-22 05:00:59.260 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser E/UncaughtException: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.maps.model.Marker com.google.android.gms.maps.GoogleMap.addMarker(com.google.android.gms.maps.model.MarkerOptions)' on a null object reference at bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser.Home$1.onComplete(Home.java:166) at com.firebase.geofire.GeoFire$2.onComplete(GeoFire.java:175) at com.google.android.gms.internal.rr.run(Unknown Source) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:7407) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 12-22 05:00:59.260 32403-32603/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/FA: Logging event (FE): app_exception(_ae), Bundle[{firebase_event_origin(_o)=crash, firebase_screen_class(_sc)=Home, firebase_screen_id(_si)=1529463756370892488, timestamp=1513911659271, fatal=1}] 12-22 05:00:59.290 32403-32603/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser V/FA: Recording user engagement, ms: 690 12-22 05:00:59.290 32403-32603/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser D/FA: Logging event (FE): user_engagement(_e), Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=690, firebase_screen_class(_sc)=Home, firebase_screen_id(_si)=1529463756370892488}] 12-22 05:00:59.410 32403-971/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Untagging socket 59 12-22 05:00:59.410 32403-971/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.410 32403-971/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.410 32403-971/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Tagging socket 59 with tag 3000110100000000{805310721,0} uid -1, pid: 32403, getuid(): 10197 12-22 05:00:59.430 32403-972/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Untagging socket 60 12-22 05:00:59.430 32403-972/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.430 32403-972/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.430 32403-972/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Tagging socket 60 with tag 3000110100000000{805310721,0} uid -1, pid: 32403, getuid(): 10197 12-22 05:00:59.490 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser E/AndroidRuntime: FATAL EXCEPTION: main Process: bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser, PID: 32403 java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.maps.model.Marker com.google.android.gms.maps.GoogleMap.addMarker(com.google.android.gms.maps.model.MarkerOptions)' on a null object reference at bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser.Home$1.onComplete(Home.java:166) at com.firebase.geofire.GeoFire$2.onComplete(GeoFire.java:175) at com.google.android.gms.internal.rr.run(Unknown Source) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:7407) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 12-22 05:00:59.500 32403-1014/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/FirebaseCrash: Sending crashes 12-22 05:00:59.500 32403-1014/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.500 32403-1014/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.510 32403-969/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Untagging socket 77 12-22 05:00:59.530 32403-970/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Untagging socket 89 12-22 05:00:59.540 32403-969/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.540 32403-969/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.540 32403-969/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Tagging socket 77 with tag 3000110100000000{805310721,0} uid -1, pid: 32403, getuid(): 10197 12-22 05:00:59.550 32403-970/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.550 32403-970/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 12-22 05:00:59.550 32403-970/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Tagging socket 89 with tag 3000110100000000{805310721,0} uid -1, pid: 32403, getuid(): 10197 12-22 05:00:59.650 32403-971/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Untagging socket 59 12-22 05:00:59.660 32403-972/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Untagging socket 60 12-22 05:00:59.800 32403-970/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Untagging socket 89 12-22 05:00:59.860 32403-1014/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/FirebaseCrash: Response code: 200 12-22 05:00:59.860 32403-1014/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/FirebaseCrash: Report sent with crash report id: 769450ec1c000000 12-22 05:00:59.970 32403-969/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/qtaguid: Untagging socket 77 12-22 05:01:00.390 32403-994/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser W/DynamiteModule: Local module descriptor class for com.google.android.gms.googlecertificates not found. 12-22 05:01:00.400 32403-994/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/DynamiteModule: Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:4 12-22 05:01:00.400 32403-994/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/DynamiteModule: Selected remote version of com.google.android.gms.googlecertificates, version >= 4 12-22 05:01:00.400 32403-994/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser W/System: ClassLoader referenced unknown path: /data/data/com.google.android.gms/app_chimera/m/00000004/n/arm64-v8a 12-22 05:01:00.400 32403-994/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser W/ResourcesManager: Resource getTopLevelResources for package com.google.android.gmsoverlayDirs =Null 12-22 05:01:01.510 32403-32403/bailphoneuser.com.hotdeskdigital.bailphone.bailphoneuser I/Process: Sending signal. PID: 32403 SIG: 9
私は今日のカップルのための解決策を探してきたが、私は成功していません。私はここで助けを見つけることを望んでいます。 ありがとうございました!
hi。私はオーバーライドメソッド 'OnMapReady'を実装しています – user3584889