我从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"
}
}
}
安装时没有请求redord音频权限但是在设置中安装后会显示RECORD_AUDIO权限-.-
我无法发布图片......很棒的链接
http://www.xup.in/dl,52994846/Screenshot_2015-10-01-11-07-24.png/
http://www.xup.in/dl,79413167/Screenshot_2015-10-01-11-08-25.png/
使用插件
答案 0 :(得分:0)
我之前也遇到过这个问题。如果我准确理解您的问题,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">
然后,在您的 RECORD_AUDIO 权限内,添加 tools:node="remove"
,如下所示:
<uses-permission android:name="android.permission.RECORD_AUDIO" tools:node="remove" />
您可能还需要将 tools:node="remove"
添加到相机权限中。