In my case error was caused because I changed visibility from gone to visible (or vice versa) of an element of the layout.
And as consequence the space for the imageview and the bitmap created changed, so recycling caused app to crash. Avoid this and your problem will be fix.