Research has been fruitless because all other references to this error seem to be reliably repeatable; I\'m unable to consistently repeat this error:
08-22 1
go to com.github.amlcurran.showcaseview.ShowcaseView
and change this method
private void updateBitmap() {
if ((bitmapBuffer == null || haveBoundsChanged()) && getMeasuredHeight() > 0 && getMeasuredWidth() > 0) {
if(bitmapBuffer != null)
bitmapBuffer.recycle();
int width = getMeasuredWidth();
int height = getMeasuredHeight();
if(width > 0 && height > 0)
bitmapBuffer = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
}
}
This is a known issue : Github issues when updateBitmap() is called too early.
This issue comes from Bitmap.createBitmap() method either width or height equals to 0.
A workaround is to delay the ShowcaseView creation more:
someView.post(new Runnable() {
@Override
public void run() {
// display ShowcaseView here
}
});
You could also change the updateBitmap() method from the library to not create the bitmap if the view width or height is wrong.
This was a bug in ShowcaseView, and was fixed starting in v5.4.2: https://github.com/amlcurran/ShowcaseView/commit/c79c60dc798f081fb62e48c549c7bdbff8da51b9
So, you can just update your build.gradle
to:
compile 'com.github.amlcurran.showcaseview:library:5.4.2'
Had the same problem, and posted my solution in another thread: https://stackoverflow.com/a/25521608/1752670
I changed the ShowcaseView class slightly