Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/232.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 无法删除cordova录制\u音频权限_Android_Cordova - Fatal编程技术网

Android 无法删除cordova录制\u音频权限

Android 无法删除cordova录制\u音频权限,android,cordova,Android,Cordova,我从AndroidManifest.xml和android.json中删除了RECORD_AUDIO权限 <?xml version='1.0' encoding='utf-8'?> <manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" package="com.runesware.betterapp" xmlns:android="htt

我从AndroidManifest.xml和android.json中删除了RECORD_AUDIO权限

<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" package="com.runesware.betterapp" xmlns:android="http://schemas.android.com/apk/res/android">
    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name" android:supportsRtl="true">
        <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.Black.NoTitleBar" android:windowSoftInputMode="adjustResize">
            <intent-filter android:label="@string/launcher_name">
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <service android:name="de.appplant.cordova.plugin.background.ForegroundService" />
        <receiver android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.TriggerReceiver" />
        <receiver android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.ClearReceiver" />
        <activity android:exported="false" android:launchMode="singleInstance" android:name="de.appplant.cordova.plugin.localnotification.ClickActivity" android:theme="@android:style/Theme.NoDisplay" />
        <receiver android:exported="false" android:name="de.appplant.cordova.plugin.notification.TriggerReceiver" />
        <receiver android:exported="false" android:name="de.appplant.cordova.plugin.notification.ClearReceiver" />
        <receiver android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.RestoreReceiver">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>
        <activity android:exported="false" android:launchMode="singleInstance" android:name="de.appplant.cordova.plugin.notification.ClickActivity" android:theme="@android:style/Theme.NoDisplay" />
    </application>
    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.VIBRATE" />
</manifest>


----android.json---
    {
        "prepare_queue": {
            "installed": [],
            "uninstalled": []
        },
        "config_munge": {
            "files": {
                "res/xml/config.xml": {
                    "parents": {
                        "/*": [
                            {
                                "xml": "<preference name=\"webView\" value=\"org.crosswalk.engine.XWalkWebViewEngine\" />",
                                "count": 1
                            },
                            {
                                "xml": "<feature name=\"File\"><param name=\"android-package\" value=\"org.apache.cordova.file.FileUtils\" /><param name=\"onload\" value=\"true\" /></feature>",
                                "count": 1
                            },
                            {
                                "xml": "<feature name=\"InAppBrowser\"><param name=\"android-package\" value=\"org.apache.cordova.inappbrowser.InAppBrowser\" /></feature>",
                                "count": 1
                            },
                            {
                                "xml": "<feature name=\"Whitelist\"><param name=\"android-package\" value=\"org.apache.cordova.whitelist.WhitelistPlugin\" /><param name=\"onload\" value=\"true\" /></feature>",
                                "count": 1
                            },
                            {
                                "xml": "<feature name=\"Device\"><param name=\"android-package\" value=\"org.apache.cordova.device.Device\" /></feature>",
                                "count": 1
                            },
                            {
                                "xml": "<feature name=\"BackgroundMode\"><param name=\"android-package\" value=\"de.appplant.cordova.plugin.background.BackgroundMode\" /></feature>",
                                "count": 1
                            },
                            {
                                "xml": "<preference name=\"KeepRunning\" value=\"true\" />",
                                "count": 1
                            },
                            {
                                "xml": "<feature name=\"LocalNotification\"><param name=\"android-package\" value=\"de.appplant.cordova.plugin.localnotification.LocalNotification\" /></feature>",
                                "count": 1
                            },
                            {
                                "xml": "<feature name=\"Suspend\"><param name=\"android-package\" value=\"org.android.tools.Suspend\" /></feature>",
                                "count": 1
                            },
                            {
                                "xml": "<feature name=\"Notification\"><param name=\"android-package\" value=\"org.apache.cordova.dialogs.Notification\" /></feature>",
                                "count": 1
                            },
                            {
                                "xml": "<feature name=\"Vibration\"><param name=\"android-package\" value=\"org.apache.cordova.vibration.Vibration\" /></feature>",
                                "count": 1
                            }
                        ]
                    }
                },
                "config.xml": {
                    "parents": {
                        "/*": [
                            {
                                "xml": "<preference name=\"AndroidPersistentFileLocation\" value=\"Internal\" />",
                                "count": 1
                            }
                        ]
                    }
                },
                "AndroidManifest.xml": {
                    "parents": {
                        "/*": [
                            {
                                "xml": "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />",
                                "count": 1
                            }
                        ],
                        "/manifest/application": [
                            {
                                "xml": "<service android:name=\"de.appplant.cordova.plugin.background.ForegroundService\" />",
                                "count": 1
                            },
                            {
                                "xml": "<receiver android:exported=\"false\" android:name=\"de.appplant.cordova.plugin.localnotification.TriggerReceiver\" />",
                                "count": 1
                            },
                            {
                                "xml": "<receiver android:exported=\"false\" android:name=\"de.appplant.cordova.plugin.localnotification.ClearReceiver\" />",
                                "count": 1
                            },
                            {
                                "xml": "<activity android:exported=\"false\" android:launchMode=\"singleInstance\" android:name=\"de.appplant.cordova.plugin.localnotification.ClickActivity\" android:theme=\"@android:style/Theme.NoDisplay\" />",
                                "count": 1
                            },
                            {
                                "xml": "<receiver android:exported=\"false\" android:name=\"de.appplant.cordova.plugin.notification.TriggerReceiver\" />",
                                "count": 1
                            },
                            {
                                "xml": "<receiver android:exported=\"false\" android:name=\"de.appplant.cordova.plugin.notification.ClearReceiver\" />",
                                "count": 1
                            },
                            {
                                "xml": "<receiver android:exported=\"false\" android:name=\"de.appplant.cordova.plugin.localnotification.RestoreReceiver\"><intent-filter><action android:name=\"android.intent.action.BOOT_COMPLETED\" /></intent-filter></receiver>",
                                "count": 1
                            },
                            {
                                "xml": "<activity android:exported=\"false\" android:launchMode=\"singleInstance\" android:name=\"de.appplant.cordova.plugin.notification.ClickActivity\" android:theme=\"@android:style/Theme.NoDisplay\" />",
                                "count": 1
                            }
                        ],
                        "/manifest": [
                            {
                                "xml": "<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\" />",
                                "count": 1
                            },
                            {
                                "xml": "<uses-permission android:name=\"android.permission.VIBRATE\" />",
                                "count": 1
                            }
                        ]
                    }
                }
            }
        },
        "installed_plugins": {
            "com.msopentech.indexedDB": {
                "PACKAGE_NAME": "com.runesware.betterapp"
            },
            "cordova-plugin-crosswalk-webview": {
                "PACKAGE_NAME": "com.runesware.betterapp"
            },
            "cordova-plugin-file": {
                "PACKAGE_NAME": "com.runesware.betterapp"
            },
            "cordova-plugin-inappbrowser": {
                "PACKAGE_NAME": "com.runesware.betterapp"
            },
            "cordova-plugin-whitelist": {
                "PACKAGE_NAME": "com.runesware.betterapp"
            },
            "de.appplant.cordova.plugin.background-mode": {
                "PACKAGE_NAME": "com.runesware.betterapp"
            },
            "de.appplant.cordova.plugin.local-notification": {
                "PACKAGE_NAME": "com.runesware.betterapp"
            },
            "org.android.tools.suspend": {
                "PACKAGE_NAME": "com.runesware.betterapp"
            },
            "org.apache.cordova.console": {
                "PACKAGE_NAME": "com.runesware.betterapp"
            },
            "org.apache.cordova.dialogs": {
                "PACKAGE_NAME": "com.runesware.betterapp"
            },
            "org.apache.cordova.vibration": {
                "PACKAGE_NAME": "com.runesware.betterapp"
            }
        },
        "dependent_plugins": {
            "org.apache.cordova.device": {
                "PACKAGE_NAME": "com.runesware.betterapp"
            }
        }
    }
安装时不请求重做音频权限,但安装后在设置中显示记录_音频权限-。-

我不能上传照片。。。这里有一些链接

使用的插件

com.msopentech.indexedDB 0.1.2 indexedDB polyfill com.tonikorin.cordova.plugin.autostart 1.2.1 autostart cordova插件crosswalk webview 1.2.0 crosswalk webview引擎 cordova插件文件3.0.0文件 cordova插件inappbrowser 1.0.1 inappbrowser cordova插件白名单1.0.0白名单 de.appplant.cordova.plugin.background-mode 0.6.3 BackgroundMode de.appplant.cordova.plugin.badge 0.7.1 cordova badge插件 de.appplant.cordova.plugin.local-notification 0.8.1本地通知 org.android.tools.suspend 0.1.2 android suspend org.apache.cordova.console 0.2.13控制台 org.apache.cordova.device 0.3.0设备 org.apache.cordova.dialogs 0.3.0通知 org.apache.cordova.vibration 0.3.13振动
我以前也有过这个问题。如果我准确地理解了您的问题,Google会抛出一个错误,请求您删除音频权限,但在您删除后可能会立即崩溃。重新添加代码,然后按照下面的步骤操作

添加xmlns:tools=http://schemas.android.com/tools 到清单行,如下所示:

<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" package="com.runesware.betterapp" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
然后,在您的录制\u音频权限内,添加工具:node=remove,如下所示:


您可能还需要将tools:node=remove添加到相机权限中。

您安装了哪些插件?我不使用任何需要录制音频的插件