I am using two different plugins into cordova, which both have the same uses-feature
, one with android:required="false"
and one without.
This results in an error upon build:
processDebugManifest
/path/to/project/platforms/android/AndroidManifest.xml:31:5 Error:
Element uses-feature#android.hardware.camera at AndroidManifest.xml:31:5 duplicated with element declared at AndroidManifest.xml:27:5
/path/to/project/platforms/android/AndroidManifest.xml:32:5 Error:
Element uses-feature#android.hardware.camera.autofocus at AndroidManifest.xml:32:5 duplicated with element declared at AndroidManifest.xml:28:5
/path/to/project/platforms/android/AndroidManifest.xml:0:0 Error:
Validation failed, exiting
:processDebugManifest FAILED
.....
ERROR building one of the platforms: Error: /path/to/project/platforms/android/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project
The compiled manifest has the following when built:
...
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-feature android:name="android.hardware.camera.flash" android:required="false" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
...
Is there anything I can do to fix this?
cordova version 5.4.1
Unable to graft xml at selector "/manifest/uses-feature[@android:name='android.hardware.location.gps']" from ".../platforms/android/app/src/main/AndroidManifest.xml" during config install
did you encounter this? – Tauro