I have 2 use two different bluetooth plugins, cordova-plugin-bluetooth-serial and cordova-plugin-ble-central, but now I can’t build the app because It seems both want to ask for the same permission.
Is there a way I can merge them in only one permission.
Here’s the build log:
Task :app:processDebugManifest FAILED
/app/platforms/android/app/src/main/AndroidManifest.xml:21:5-81 Warning:
Element uses-permission#android.permission.ACCESS_COARSE_LOCATION at AndroidManifest.xml:21:5-81 duplicated with element declared at AndroidManifest.xml:20:5-81
/app/platforms/android/app/src/main/AndroidManifest.xml:22:5-68 Warning:
Element uses-permission#android.permission.BLUETOOTH at AndroidManifest.xml:22:5-68 duplicated with element declared at AndroidManifest.xml:18:5-68
/app/platforms/android/app/src/main/AndroidManifest.xml:23:5-74 Warning:
Element uses-permission#android.permission.BLUETOOTH_ADMIN at AndroidManifest.xml:23:5-74 duplicated with element declared at AndroidManifest.xml:19:5-74
/app/platforms/android/app/src/main/AndroidManifest.xml:24:5-108 Error:
Element uses-permission#android.permission.ACCESS_COARSE_LOCATION at AndroidManifest.xml:24:5-108 duplicated with element declared at AndroidManifest.xml:21:5-81
/app/platforms/android/app/src/main/AndroidManifest.xml:27:5-95 Error:
Element uses-permission#android.permission.BLUETOOTH at AndroidManifest.xml:27:5-95 duplicated with element declared at AndroidManifest.xml:22:5-68
/app/platforms/android/app/src/main/AndroidManifest.xml:28:5-101 Error:
Element uses-permission#android.permission.BLUETOOTH_ADMIN at AndroidManifest.xml:28:5-101 duplicated with element declared at AndroidManifest.xml:23:5-74
/app/platforms/android/app/src/main/AndroidManifest.xml Error:
Validation failed, exiting
In the log it also suggest
Executing script found in plugin cordova-plugin-ble-central for hook "after_prepare": plugins/cordova-plugin-ble-central/hooks/after_prepare.js
cordova-plugin-ble-central: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
cordova-plugin-ble-central: WARNING - duplicate android permissions found: android.permission.ACCESS_COARSE_LOCATION
cordova-plugin-ble-central: See https://github.com/don/cordova-plugin-ble-central/issues/925
cordova-plugin-ble-central: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
But I’ve try it and found that UserError: Hooks are not supported.
Do you know where I can found more things to try or how to solve this?
Thank’s