Bitmap is returning null from BitmapFactory.decodeFile(filename)

前端 未结 14 1155
悲哀的现实
悲哀的现实 2020-11-29 04:19

When I am calling this function there is no image in image view bitmapFactory.decodefile(filename) showing null .. please help for this.

Here is my cod

14条回答
  •  囚心锁ツ
    2020-11-29 05:04

    if you are trying in android 10 try adding this to your application in manifest android:requestLegacyExternalStorage="true" it may be a permission issue with android 10 since it doesn't allow direct access to files

提交回复
热议问题