App crashes due to java.lang.SecurityException

前端 未结 5 976
甜味超标
甜味超标 2021-01-17 01:16

I am working on the project of capturing photos or picking images from gallery and show it in the recycler view, the app is working good in Android-lollipop but crashes in m

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-17 01:45

    You need to give android.hardware.Camera permission programmatically.

    manifeast permission not work on Android Marshmallow

    In marshmallow,We require runtime permissions for Storage,Contacts,Camera, etc. In edition to give these permissions in manifest for older version, We need to request them from users at Runtime for marshmallow. For more details refer this : Marshmallow permissions

提交回复
热议问题