Cordova adds unwanted permission to AndroidManifest.xml when building from CLI

前端 未结 6 936
Happy的楠姐
Happy的楠姐 2021-01-18 07:13

I use CLI to build my Cordova app, and I have added the Media plugin.

\'cordova build\' automatically adds the android.permission.RECORD_AUDIO to my AndroidManifest.

6条回答
  •  长发绾君心
    2021-01-18 07:57

    To keep plugins from re-adding unnecessary permissions edit platforms/android/android.json.

    Locate these lines and remove them:

    {
        "xml": "",
        "count": 1
    }
    

    Please note that this is a "dirty" solution. After adding/updating plugins, you'll probably have to repeat this.

提交回复
热议问题