Android getAbsolutePath() not returning full path

前端 未结 1 1637
悲&欢浪女
悲&欢浪女 2021-01-26 20:45

I create a file and save an image to it using the following code:

private File createImageFile() throws IOException {
        String timeStamp = new SimpleDateFo         


        
相关标签:
1条回答
  • 2021-01-26 21:42

    The actual path of the image is

    You may have a file there, but that is not the File that you are setting up in the code. Try getExternalFilesDir(null) instead of getFilesDir().

    0 讨论(0)
提交回复
热议问题