3

12-21 11:01:14.045: E/AndroidRuntime(6819): java.lang.RuntimeException: Canvas: リサイクルされたビットマップを使用しようとしています android.graphics.Bitmap@4180103 12-21 11:01:14.045: E/AndroidRuntime( 6819): android.graphics.Canvas.throwIfCannotDraw(Canvas.java:1084) 12-21 11:01:14.045: E/AndroidRuntime(6819): android.view.GLES20Canvas.drawBitmap(GLES20Canvas.java:844) 12 -21 11:01:14.045: E/AndroidRuntime(6819): android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:490) で 12-21 11:01:14.045: E/AndroidRuntime(6819): Android で.widget.ImageView.onDraw(ImageView.java:1037) 12-21 11:01:14.045: E/AndroidRuntime(6819): android.view.View.draw(View.java:14465) 12-21 11:01 :14.045: E/AndroidRuntime(6819): android.view.View.getDisplayList(View.java:13362) 12-21 11:01:14.045: E/AndroidRuntime(6819): android.view.View.getDisplayList(View.java:13404) 12-21 11:01:14.045: E/AndroidRuntime(6819): android.view.View.draw(View.java:14182) 12-21 11:01:14.045: E/ AndroidRuntime(6819): android.view.ViewGroup.drawChild(ViewGroup.java:3103) 12-21 11:01:14.045: E/AndroidRuntime(6819): android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940) ) 12-21 11:01:14.045: E/AndroidRuntime(6819): android.widget.AbsListView.dispatchDraw(AbsListView.java:2458) でdispatchDraw(AbsListView.java:2458)dispatchDraw(AbsListView.java:2458)

新しいクラスを作成して extendsBasePostprocessorにしますが、そこでは何もしません。しかし、実行すると、サンプルは上記の例外をスローします。imagepipeline画像をダウンロードするために使用するだけで、 simpledraweeview.

com.facebook.imagepipeline.request.ImageRequestBuilder requestBuilder=   com.facebook.imagepipeline.request.ImageRequestBuilder
.newBuilderWithSource(uri);

if (imageRequest.getTargetWidth() > 0 && imageRequest.getTargetHeight()  > 0) {
    requestBuilder.setResizeOptions(new com.facebook.imagepipeline.common.ResizeOptions(imageRequest
            .getTargetWidth(), imageRequest.getTargetHeight()));
}

requestBuilder.setAutoRotateEnabled(true);
requestBuilder.setPostprocessor(new FPostProcessor(getImageConfig()));
public class FPostProcessor extends BasePostprocessor{
private FImageConfig mImageConfig;

public FPostProcessor(FImageConfig imageConfig){
    mImageConfig = imageConfig;
}
/*
@Override
public CloseableReference<Bitmap> process(Bitmap sourceBitmap,    PlatformBitmapFactory bitmapFactory) {
return super.process(sourceBitmap, bitmapFactory);
}*/
}
4

1 に答える 1