java.lang.NullPointerException: Attempt to read from field 'double com.google.android.gms.maps.model.LatLng.a' on a null object reference

tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0

    java.lang.NullPointerException: Attempt to read from field 'double com.google.android.gms.maps.model.LatLng.a' on a null object reference

    Stack Overflow | 2 months ago | JohnRogersColumbiaEDU
    java.lang.NullPointerException: Attempt to read from field 'double com.google.android.gms.maps.model.LatLng.a' on a null object reference
  2. 0
    samebug tip
    When you use findViewById inside an activity it is going to look for a View inside your main_activity.xml. If it's not there, it throws this exception, try to use the right view to call findviewById.
  3. 0
    samebug tip
    This issue was solved in 2.2.6. If updating doesn't solve, try using notifyItemRangeChanged(1, mDatas.size()) instead of notifyItemRangeChanged(0, mDatas.size()).
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    If you're using notifyItemChanged(position) try changing it for notifyDataSetChanged(). This could be a bug with notifyItemChanged. Try dispatching all events as soon as they happen as well, since RecyclerView already bundles the updates by default.
  6. 0
    samebug tip
    Also, you should dispatch events as soon as they happen, ReciclerView already bundles all updates.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to read from field 'double com.google.android.gms.maps.model.LatLng.a' on a null object reference

      at com.myapp.mapapp.helper.SavedItemsAdapter.access$000()
    2. com.myapp.mapapp
      SavedItemsAdapter.getView
      1. com.myapp.mapapp.helper.SavedItemsAdapter.access$000(SavedItemsAdapter.java:16)
      2. com.myapp.mapapp.helper.SavedItemsAdapter$ViewHolder.build(SavedItemsAdapter.java:47)
      3. com.myapp.mapapp.helper.SavedItemsAdapter.getView(SavedItemsAdapter.java:33)
      3 frames
    3. Android Platform
      View.measure
      1. android.widget.AbsListView.obtainView(AbsListView.java:2929)
      2. android.widget.ListView.measureHeightOfChildren(ListView.java:1305)
      3. android.widget.ListView.onMeasure(ListView.java:1212)
      4. android.view.View.measure(View.java:20151)
      5. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
      6. android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
      7. android.view.View.measure(View.java:20151)
      8. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
      9. android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
      10. android.view.View.measure(View.java:20151)
      10 frames
    4. Android v7
      AlertDialogLayout.onMeasure
      1. android.support.v7.widget.AlertDialogLayout.tryOnMeasure(AlertDialogLayout.java:135)
      2. android.support.v7.widget.AlertDialogLayout.onMeasure(AlertDialogLayout.java:63)
      2 frames
    5. Android Platform
      FrameLayout.onMeasure
      1. android.view.View.measure(View.java:20151)
      2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
      3. android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
      3 frames
    6. Android v7
      ContentFrameLayout.onMeasure
      1. android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:139)
      1 frame
    7. Android Platform
      FrameLayout.onMeasure
      1. android.view.View.measure(View.java:20151)
      2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
      3. android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
      4. android.view.View.measure(View.java:20151)
      5. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
      6. android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
      7. android.view.View.measure(View.java:20151)
      8. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
      9. android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)
      10. android.widget.LinearLayout.measureVertical(LinearLayout.java:747)
      11. android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
      12. android.view.View.measure(View.java:20151)
      13. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
      14. android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
      14 frames
    8. Android
      PhoneWindow$DecorView.onMeasure
      1. com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:3158)
      1 frame
    9. Android Platform
      ActivityThread.main
      1. android.view.View.measure(View.java:20151)
      2. android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2594)
      3. android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1524)
      4. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1841)
      5. android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1437)
      6. android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7397)
      7. android.view.Choreographer$CallbackRecord.run(Choreographer.java:920)
      8. android.view.Choreographer.doCallbacks(Choreographer.java:695)
      9. android.view.Choreographer.doFrame(Choreographer.java:631)
      10. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906)
      11. android.os.Handler.handleCallback(Handler.java:739)
      12. android.os.Handler.dispatchMessage(Handler.java:95)
      13. android.os.Looper.loop(Looper.java:158)
      14. android.app.ActivityThread.main(ActivityThread.java:7224)
      14 frames
    10. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Method.java)
      1 frame
    11. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
      2 frames