java.io.FileNotFoundException

R.drawable.pg1: open failed: ENOENT (No such file or directory) D/AndroidRuntime: Shutting down VM E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.mt_br.floatingactionbutton, PID: 13647 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.Bitmap.compress(android.graphics.Bitmap$CompressFormat, int, java.io.OutputStream)' on a null object reference

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web12491

  • R.drawable.pg1: open failed: ENOENT (No such file or directory) D/AndroidRuntime: Shutting down VM E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.mt_br.floatingactionbutton, PID: 13647 java.lang.NullPointerException: Attempt to invoke
  • via testin.cn by Unknown author, 10 months ago
    /e:/fileName.txt: open failed: ENOENT (No such file or directory)
  • via testin.cn by Unknown author, 9 months ago
    /e:/fileName.txt: open failed: ENOENT (No such file or directory)
  • Stack trace

    • java.io.FileNotFoundException: R.drawable.pg1: open failed: ENOENT (No such file or directory) D/AndroidRuntime: Shutting down VM E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.mt_br.floatingactionbutton, PID: 13647 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.Bitmap.compress(android.graphics.Bitmap$CompressFormat, int, java.io.OutputStream)' on a null object reference at com.example.mt_br.floatingactionbutton.MainActivity$2.postPicture(MainActivity.java:112) at com.example.mt_br.floatingactionbutton.MainActivity$2.onClick(MainActivity.java:101)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You’re the first here who have seen this exception.