FATAL EXCEPTION: main
Process: com.windward.vii, PID: 25407
java.lang.RuntimeException: Canvas: trying to draw too large(162708480bytes) bitmap.
at android.view.DisplayListCanvas.throwIfCannotDraw(DisplayListCanvas.java:229)
at android.view.RecordingCanvas.drawBitmap(RecordingCanvas.java:97)
at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:529)
at android.widget.ImageView.onDraw(ImageView.java:1367)
at android.view.View.draw(View.java:19145)
at com.bm.library.PhotoView.draw(PhotoView.java:562)
at android.view.View.updateDisplayListIfDirty(View.java:18095)
at android.view.View.draw(View.java:18873)
at android.view.ViewGroup.drawChild(ViewGroup.java:4216)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4002)
at android.view.View.draw(View.java:19148)
at android.support.v4.view.ViewPager.draw(ViewPager.java:2420)
at android.view.View.updateDisplayListIfDirty(View.java:18095)
at android.view.View.draw(View.java:18873)
本地图片选择器,预览图片,滑动时会造成如下崩溃。 大图并没有问题,反而是小的素材图,ViewPager滑动预览崩溃。 素材地址:https://files.cnblogs.com/files/purediy/104.zip
FATAL EXCEPTION: main Process: com.windward.vii, PID: 25407 java.lang.RuntimeException: Canvas: trying to draw too large(162708480bytes) bitmap. at android.view.DisplayListCanvas.throwIfCannotDraw(DisplayListCanvas.java:229) at android.view.RecordingCanvas.drawBitmap(RecordingCanvas.java:97) at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:529) at android.widget.ImageView.onDraw(ImageView.java:1367) at android.view.View.draw(View.java:19145) at com.bm.library.PhotoView.draw(PhotoView.java:562) at android.view.View.updateDisplayListIfDirty(View.java:18095) at android.view.View.draw(View.java:18873) at android.view.ViewGroup.drawChild(ViewGroup.java:4216) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4002) at android.view.View.draw(View.java:19148) at android.support.v4.view.ViewPager.draw(ViewPager.java:2420) at android.view.View.updateDisplayListIfDirty(View.java:18095) at android.view.View.draw(View.java:18873)