Attempt to invoke virtual method 'boolean android.graphics.Bitmap.compress(android.graphics.Bitmap$CompressFormat, int, java.io.OutputStream)' on a null object reference com.emekalites.react.compress.image.ImageUtil.compressImage
Device
Brand: LGE
Model: LG K10 LTE
Orientation: Portrait
RAM free: 179.56 MB
Disk free: 6.02 GB
Operating System
Version: 6.0
Orientation: Portrait
Rooted: No
Other devices are Tecno Spark, Tecno Camen I, Samsung Galaxy S5, Galaxy J2, Xiomi Redmi 5.
Mostly Seen in Android 5, Android 6, and Android 7.
The error is seen multiple times in the above device.
It is coming in the compressImage method present in the ImageUtil.java file.
When the decodeSampledBitmapFromFile returns a null from the catch section to the compressImage method, the decodeSampledBitmapFromFile(imageFile, reqWidth, reqHeight).compress(compressFormat, quality, fileOutputStream); ends up as null.compress(compressFormat, quality, fileOutputStream);
Attempt to invoke virtual method 'boolean android.graphics.Bitmap.compress(android.graphics.Bitmap$CompressFormat, int, java.io.OutputStream)' on a null object reference com.emekalites.react.compress.image.ImageUtil.compressImage
Device Brand: LGE Model: LG K10 LTE Orientation: Portrait RAM free: 179.56 MB Disk free: 6.02 GB Operating System Version: 6.0 Orientation: Portrait Rooted: No
Other devices are Tecno Spark, Tecno Camen I, Samsung Galaxy S5, Galaxy J2, Xiomi Redmi 5. Mostly Seen in Android 5, Android 6, and Android 7.
The error is seen multiple times in the above device. It is coming in the
compressImage
method present in theImageUtil.java
file. When thedecodeSampledBitmapFromFile
returns anull
from thecatch
section to thecompressImage
method, thedecodeSampledBitmapFromFile(imageFile, reqWidth, reqHeight).compress(compressFormat, quality, fileOutputStream);
ends up asnull.compress(compressFormat, quality, fileOutputStream);
Please Help. Thanks.