Skip to content
Advertisement

Null Pointer Exception when Compressing a Bitmap created from layout [closed]

I am trying to make an image from the layout and download it. I am downloading this as a test to make sure the image is correct before I attempt to then convert the bitmap to PDF for download.

I am receiving a null pointer exception, and I am having issues trying to fix this issue.

JavaScript

Advertisement

Answer

JavaScript

You declared File here, but did not create it

try file.createNewFile()

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement