java.lang.IllegalArgumentException: width and height must be > 0

GitHub | ahmadalibaloch | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    GitHub comment 181#286564412

    GitHub | 2 months ago | virengujariya
    java.lang.IllegalArgumentException: width and height must be > 0
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Crash when setImageDrawable using TextDrawable

    GitHub | 2 years ago | antercepter
    java.lang.IllegalArgumentException: width and height must be > 0
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.IllegalArgumentException

    width and height must be > 0

    at android.graphics.Bitmap.createBitmap()
  2. Android Platform
    Bitmap.createBitmap
    1. android.graphics.Bitmap.createBitmap(Bitmap.java:933)
    2. android.graphics.Bitmap.createBitmap(Bitmap.java:912)
    3. android.graphics.Bitmap.createBitmap(Bitmap.java:879)
    3 frames
  3. de.hdodenhof.circleimageview
    CircleImageView.setImageDrawable
    1. de.hdodenhof.circleimageview.CircleImageView.getBitmapFromDrawable(CircleImageView.java:337)
    2. de.hdodenhof.circleimageview.CircleImageView.initializeBitmap(CircleImageView.java:354)
    3. de.hdodenhof.circleimageview.CircleImageView.setImageDrawable(CircleImageView.java:285)
    3 frames
  4. ion
    IonImageViewRequestBuilder.load
    1. com.koushikdutta.ion.IonImageViewRequestBuilder.setIonDrawable(IonImageViewRequestBuilder.java:106)
    2. com.koushikdutta.ion.IonImageViewRequestBuilder.intoImageView(IonImageViewRequestBuilder.java:180)
    3. com.koushikdutta.ion.IonImageViewRequestBuilder.load(IonImageViewRequestBuilder.java:72)
    3 frames
  5. com.xoredgeapps.bayanstube
    DashboardRealmRecyclerViewAdapter.onBindRealmViewHolder
    1. com.xoredgeapps.bayanstube.fragments.DashboardRealmRecyclerViewAdapter.onBindRealmViewHolder(DashboardRealmRecyclerViewAdapter.java:61)
    2. com.xoredgeapps.bayanstube.fragments.DashboardRealmRecyclerViewAdapter.onBindRealmViewHolder(DashboardRealmRecyclerViewAdapter.java:21)
    2 frames
  6. io.realm
    RealmBasedRecyclerViewAdapter.onBindViewHolder
    1. io.realm.RealmBasedRecyclerViewAdapter.onBindViewHolder(RealmBasedRecyclerViewAdapter.java:285)
    2. io.realm.RealmBasedRecyclerViewAdapter.onBindViewHolder(RealmBasedRecyclerViewAdapter.java:49)
    2 frames
  7. Android v7
    RecyclerView.onLayout
    1. android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:5825)
    2. android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:5858)
    3. android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5094)
    4. android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4970)
    5. android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2029)
    6. android.support.v7.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:541)
    7. android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1377)
    8. android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:578)
    9. android.support.v7.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:170)
    10. android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3315)
    11. android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3124)
    12. android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3568)
    12 frames
  8. Android Platform
    ViewGroup.layout
    1. android.view.View.layout(View.java:16711)
    2. android.view.ViewGroup.layout(ViewGroup.java:5328)
    2 frames
  9. Android Support v4
    SwipeRefreshLayout.onLayout
    1. android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:613)
    1 frame
  10. Android Platform
    ViewGroup.layout
    1. android.view.View.layout(View.java:16711)
    2. android.view.ViewGroup.layout(ViewGroup.java:5328)
    3. android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
    4. android.widget.FrameLayout.onLayout(FrameLayout.java:508)
    5. android.view.View.layout(View.java:16711)
    6. android.view.ViewGroup.layout(ViewGroup.java:5328)
    7. android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
    8. android.widget.FrameLayout.onLayout(FrameLayout.java:508)
    9. android.view.View.layout(View.java:16711)
    10. android.view.ViewGroup.layout(ViewGroup.java:5328)
    11. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1702)
    12. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1556)
    13. android.widget.LinearLayout.onLayout(LinearLayout.java:1465)
    14. android.view.View.layout(View.java:16711)
    15. android.view.ViewGroup.layout(ViewGroup.java:5328)
    15 frames
  11. Android Support v4
    ViewPager.onLayout
    1. android.support.v4.view.ViewPager.onLayout(ViewPager.java:1767)
    1 frame
  12. Android Platform
    ViewGroup.layout
    1. android.view.View.layout(View.java:16711)
    2. android.view.ViewGroup.layout(ViewGroup.java:5328)
    2 frames
  13. android.support.design
    CoordinatorLayout.onLayout
    1. android.support.design.widget.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:131)
    2. android.support.design.widget.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:42)
    3. android.support.design.widget.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:1364)
    4. android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:846)
    4 frames
  14. Android Platform
    ActivityThread.main
    1. android.view.View.layout(View.java:16711)
    2. android.view.ViewGroup.layout(ViewGroup.java:5328)
    3. android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
    4. android.widget.FrameLayout.onLayout(FrameLayout.java:508)
    5. android.view.View.layout(View.java:16711)
    6. android.view.ViewGroup.layout(ViewGroup.java:5328)
    7. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1702)
    8. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1556)
    9. android.widget.LinearLayout.onLayout(LinearLayout.java:1465)
    10. android.view.View.layout(View.java:16711)
    11. android.view.ViewGroup.layout(ViewGroup.java:5328)
    12. android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
    13. android.widget.FrameLayout.onLayout(FrameLayout.java:508)
    14. android.view.View.layout(View.java:16711)
    15. android.view.ViewGroup.layout(ViewGroup.java:5328)
    16. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1702)
    17. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1556)
    18. android.widget.LinearLayout.onLayout(LinearLayout.java:1465)
    19. android.view.View.layout(View.java:16711)
    20. android.view.ViewGroup.layout(ViewGroup.java:5328)
    21. android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
    22. android.widget.FrameLayout.onLayout(FrameLayout.java:508)
    23. android.view.View.layout(View.java:16711)
    24. android.view.ViewGroup.layout(ViewGroup.java:5328)
    25. android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2319)
    26. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2032)
    27. android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1191)
    28. android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6642)
    29. android.view.Choreographer$CallbackRecord.run(Choreographer.java:777)
    30. android.view.Choreographer.doCallbacks(Choreographer.java:590)
    31. android.view.Choreographer.doFrame(Choreographer.java:560)
    32. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:763)
    33. android.os.Handler.handleCallback(Handler.java:739)
    34. android.os.Handler.dispatchMessage(Handler.java:95)
    35. android.os.Looper.loop(Looper.java:145)
    36. android.app.ActivityThread.main(ActivityThread.java:5951)
    36 frames
  15. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:372)
    2 frames
  16. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
    2 frames