Access denied for property “vendor.camera.aux.packagelist”

前端 未结 6 2168
暗喜
暗喜 2021-01-05 05:03

The application runs but when i try to use the camera only a disturbed grey screen appears and the logs tab gives me two errors:

E/libc: Access denied findin         


        
6条回答
  •  庸人自扰
    2021-01-05 05:24

    First, check your Android version. If it is running on Android 6.0 and higher (API level 23+), then you need to :

    Declare a permission in the app manifest. Make sure to insert the permission above the application tag.

    
    
    
    
        ...
    
    

    Then, request that the user approve each permission at runtime

    if (ContextCompat.checkSelfPermission(context, Manifest.permission.CAMERA) != 
    PackageManager.PERMISSION_GRANTED) { 
    ActivityCompat.requestPermissions(this, new String[] {Manifest.permission.CAMERA}, 
    50); }
    

提交回复
热议问题