Android: Permission Denial: starting Intent with revoked permission android.permission.CAMERA

后端 未结 10 1376
一个人的身影
一个人的身影 2020-11-29 07:47

I\'m trying to start a ACTION_IMAGE_CAPTURE activity in order to take a picture in my app and I\'m getting the error in the subject.

Stacktrace:

10条回答
  •  Happy的楠姐
    2020-11-29 08:41

    Remove this permission

      
    

    I faced this error executing my app in android 7. After tests I noticed user permission wasn't in project A but it was in project B, that I only tested in android 5 devices. So I remove that permission in project B in order to run it on other device that targets android 7 and it finally could open.

    In adittion I added the fileprovider code that Android suggests here https://developer.android.com/training/camera/photobasics.html Hope this helps.

提交回复
热议问题