请各位大侠帮忙看一下,这种错误一般在什么情况下出现,现在项目上线了监测到这样一个错误,花好长时间找不到原因,请各位看看,谢了!
FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to save state of activity {com.iiyi.basic.android/com.iiyi.basic.android.ui.bbs.home.SubForumActivity}: java.lang.RuntimeException: Unable to create thumbnail of {com.iiyi.basic.android/com.iiyi.basic.android.ui.bbs.home.SubForumActivity}: java.lang.IllegalArgumentException: width and height must be > 0
at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:2456)
at android.app.ActivityThread.handleStopActivity(ActivityThread.java:2515)
at android.app.ActivityThread.access$1800(ActivityThread.java:122)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:953)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3723)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: Unable to create thumbnail of {com.iiyi.basic.android/com.iiyi.basic.android.ui.bbs.home.SubForumActivity}: java.lang.IllegalArgumentException: width and height must be > 0
at android.app.ActivityThread.createThumbnailBitmap(ActivityThread.java:2290)
at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:2452)
... 11 more
Caused by: java.lang.IllegalArgumentException: width and height must be > 0
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:477)
at android.app.ActivityThread.drawableToBitmap(ActivityThread.java:2306)
at android.app.ActivityThread.createThumbnailBitmap(ActivityThread.java:2265)
... 12 more

解决方案 »

  1.   

    IllegalArgumentException此异常表明向方法传递了一个不合法或不正确的参数。你看看传值的方法是否参数不正确。 
      

  2.   

    非法参数SubForumActivity中你引用了Bitmap的构造函数java.lang.IllegalArgumentException: width and height must be > 0  说的很清楚,在你传入给Bitmap参数前,进行下width、height的判断
      

  3.   


     ++ 就是非法参数, Width Height值小于0 
      

  4.   

    让我猜猜,长宽获取不对,估计解码的时候用int去读float的值
      

  5.   

    谢谢各位的帮助,但是让我很不解的是,我的工程里面没有用到是什么Width、Height之类的东西