I\'m getting the following stacktrace in the developer console. Some report say \"the application won\'t start\" or \"crash at startup\".
I don\'t know what to do, i
Bitmap.createBitmap()
Throws IllegalArgumentException
if the x, y, width, height values are outside of the dimensions of the source bitmap, or width is <= 0, or height is <= 0
First make sure your x, y, width and height values are smaller than the source bitmap.
The issue for me was the matrix. My matrix has a translation value which brought the one of the values outside of the bounds of the input bitmap.
Hope this helps
if it 's a matter of quantity, you have to recycle your bitmaps.
if it's a matter of size (you can't load too big images), you have to load a lighter copy of your bitmap.
Here is the code to create a smaller image
Options thumbOpts = new Options();
thumbOpts.inSampleSize = 4;
Bitmap bmp = BitmapFactory.decodeFile(imagePath, mThumbOpts);
inSampleSize set to a value > 1, requests the decoder to subsample the original image, returning a smaller image to save memory.
Use a power of 2 for it to be more efficient.
This post may be useful
In my case it was error in this string:
WebView.getSettings().setUseWideViewPort(true);
Crash was only on API 18 and less