java.lang.NullPointerException

Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference


Solutions on the web21508

Solution icon of github
via GitHub by dyguests
, 9 months ago
Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference

Solution icon of github
via GitHub by acrozes
, 2 months ago
Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference

Solution icon of github
Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference

Solution icon of github
via GitHub by RunCross
, 7 months ago
Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference

Solution icon of github
Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference

Solution icon of github
Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference

Solution icon of github
Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference

Solution icon of googlegroups
via Google Groups by Muhammad Babar, 1 month ago
Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference

Solution icon of stackoverflow
Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference

Solution icon of stackoverflow
via Stack Overflow by jmo
, 1 year ago
Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference

Stack trace

  • java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference at com.airbnb.android.react.maps.AirMapMarker.getIcon(AirMapMarker.java:272) at com.airbnb.android.react.maps.AirMapMarker.createMarkerOptions(AirMapMarker.java:301) at com.airbnb.android.react.maps.AirMapMarker.getMarkerOptions(AirMapMarker.java:236) at com.airbnb.android.react.maps.AirMapMarker.addToMap(AirMapMarker.java:258) at com.airbnb.android.react.maps.AirMapView.addFeature(AirMapView.java:398) at com.airbnb.android.react.maps.AirMapManager.addView(AirMapManager.java:277) at com.airbnb.android.react.maps.AirMapManager.addView(AirMapManager.java:29) at com.facebook.react.uimanager.NativeViewHierarchyManager.manageChildren(NativeViewHierarchyManager.java:394) at com.facebook.react.uimanager.UIViewOperationQueue$ManageChildrenOperation.execute(UIViewOperationQueue.java:175) at com.facebook.react.uimanager.UIViewOperationQueue$2.run(UIViewOperationQueue.java:782) at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:829) at com.facebook.react.uimanager.UIViewOperationQueue.access$1500(UIViewOperationQueue.java:44) at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:868) at com.facebook.react.uimanager.GuardedChoreographerFrameCallback.doFrame(GuardedChoreographerFrameCallback.java:32) at com.facebook.react.uimanager.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:131) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:918) at android.view.Choreographer.doCallbacks(Choreographer.java:695) at android.view.Choreographer.doFrame(Choreographer.java:628) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7231) 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)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.