java.lang.NullPointerException: Attempt to write to field 'int android.view.ViewGroup$LayoutParams.height' on a null object reference

Stack Overflow | Sem Ideia | 4 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    I can't inflate a view in a custom infowindow in Mapbox. (Setting getinfowindow with images)

    Stack Overflow | 4 months ago | Sem Ideia
    java.lang.NullPointerException: Attempt to write to field 'int android.view.ViewGroup$LayoutParams.height' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to write to field 'int android.view.ViewGroup$LayoutParams.height' on a null object reference

      at afinal.projeto.unb.guiadoaluno.Mapa$1$1.getInfoWindow()
    2. afinal.projeto.unb
      Mapa$1$1.getInfoWindow
      1. afinal.projeto.unb.guiadoaluno.Mapa$1$1.getInfoWindow(Mapa.java:87)
      1 frame
    3. com.mapbox.mapboxsdk
      MapView$GestureListener.onSingleTapConfirmed
      1. com.mapbox.mapboxsdk.annotations.Marker.showInfoWindow(Marker.java:165)
      2. com.mapbox.mapboxsdk.maps.MapboxMap.selectMarker(MapboxMap.java:1295)
      3. com.mapbox.mapboxsdk.maps.MapView$GestureListener.onSingleTapConfirmed(MapView.java:1792)
      3 frames
    4. Android Platform
      ActivityThread.main
      1. android.view.GestureDetector$GestureHandler.handleMessage(GestureDetector.java:280)
      2. android.os.Handler.dispatchMessage(Handler.java:102)
      3. android.os.Looper.loop(Looper.java:145)
      4. android.app.ActivityThread.main(ActivityThread.java:5940)
      4 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1389)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1184)
      2 frames