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

前端 未结 6 937
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 08:02

    In your project, edit the file plugins/org.apache.cordova.media/plugin.xml You'll see the android specific configuration

       
            
                
                    
                
            
    
            
                
                
                
                
            
    ...
    

    remove the line like this the permission will not be added each time you build.

    As the permission has already been added to AndroidManifest.xml, you'll have to remove it manually and then it should not come back next time you build.

提交回复
热议问题