I get this error only from Asus ZenFone 3 (ZE552KL) (ASUS_Z012D), Android 8.0
java.lang.NullPointerException: at android.graphics.Bitmap.createScaledBitmap (Bitmap.java:714)
File imageFile = new File(
Environment.getExternalStorageDirectory().getAbsolutePath()+"/"+imageBlocksFolder, "img122.png");
if(imageFile.exists()){
bitmap = Bitmap.createScaledBitmap(BitmapFactory.decodeFile(imageFile.getAbsolutePath()), 50, 50, false);
paint.setColor(cor);
canvas.drawBitmap(bitmap, 100, 100, paint);
}
Has anyone ever encountered the same problem?