Null pointer Exception on file- URI?

后端 未结 4 1136
感动是毒
感动是毒 2020-12-11 05:19

In my app a capture button is there to capture an image using device camera,so I have used a method captureImage() on the click event of that button.When I click the button

4条回答
  •  时光说笑
    2020-12-11 06:03

    File mediaStorageDir = new File(
                Environment
                      .getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES),
                Config.IMAGE_DIRECTORY_NAME);
    

    I directly copied to code from Android getting started page. My problem was I was running it on emulator. Therefore I think the code above that I used could not assess my file system.

提交回复
热议问题