Cordova-plugin-camera

The cordova-plugin-camera causes this error when compiling:


UserError: FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ‘:app:processReleaseMainManifest’.
Manifest merger failed with multiple errors, see logs
See log for full details.


In my project I have been using cordova-plugin-camera for years. But now with the last update I’m doing for android-targetSdkVersion 33, if I use cordova-plugin-camera it doesn’t let me compile.

Thanks for your help.

The full log is going to have the detail needed to solve this. I would suggest posting it here.

Hello, here is my log. I hope it can be of help.

2023-09-15 11:02:39,394 - #1 SMP Debian 5.10.149-2 (2022-10-21)
2023-09-15 11:02:39,520 - app.framework: cordova
2023-09-15 11:02:39,521 - Verbose logging is off. Change this in voltbuilder.json
2023-09-15 11:02:39,521 - VoltBuilder run started at 2023-09-15 11:02:39.521853
2023-09-15 11:02:39,522 - Plan: Indy
2023-09-15 11:02:39,522 - Preflight Check
2023-09-15 11:02:39,522 - adding android to xmlns
2023-09-15 11:02:39,524 - id is com.creatactil.coarco
2023-09-15 11:02:40,386 - Output: Creating a new cordova project.

2023-09-15 11:03:18,857 - Output: Using cordova-fetch for cordova-android
Adding android project...
Creating Cordova project for the Android platform:
	Path: platforms/android
	Package: com.creatactil.coarco
	Name: COARCO
	Activity: MainActivity
	Android Target SDK: android-33
	Android Compile SDK: 33
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@12.0.1
Plugin 'cordova-plugin-firebasex' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-camera' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-globalization' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-network-information' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-cleartext' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-badge' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-statusbar' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-appversion' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-inappbrowser' found in config.xml... Migrating it to package.json
Plugin 'cordova-unique-device-id' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-dialogs' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-androidx-adapter' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-file' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-x-socialsharing-android12' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-splashscreen' found in config.xml... Migrating it to package.json
Discovered plugin "cordova-plugin-firebasex". Adding it to the project
Installing "cordova-plugin-firebasex" for android
Subproject Path: CordovaLib
Subproject Path: app
Adding cordova-plugin-firebasex to package.json
Discovered plugin "cordova-plugin-camera". Adding it to the project
Installing "cordova-plugin-camera" for android
Subproject Path: CordovaLib
Subproject Path: app
Adding cordova-plugin-camera to package.json
Discovered plugin "cordova-plugin-globalization". Adding it to the project
Installing "cordova-plugin-globalization" for android
Adding cordova-plugin-globalization to package.json
Discovered plugin "cordova-plugin-network-information". Adding it to the project
Installing "cordova-plugin-network-information" for android
Adding cordova-plugin-network-information to package.json
Discovered plugin "cordova-plugin-cleartext". Adding it to the project
Installing "cordova-plugin-cleartext" for android
Adding cordova-plugin-cleartext to package.json
Discovered plugin "cordova-plugin-badge". Adding it to the project
Installing "cordova-plugin-badge" for android
Subproject Path: CordovaLib
Subproject Path: app
Adding cordova-plugin-badge to package.json
Discovered plugin "cordova-plugin-statusbar". Adding it to the project
Installing "cordova-plugin-statusbar" for android
Adding cordova-plugin-statusbar to package.json
Discovered plugin "cordova-plugin-appversion". Adding it to the project
Installing "cordova-plugin-appversion" for android
Adding cordova-plugin-appversion to package.json
Discovered plugin "cordova-plugin-inappbrowser". Adding it to the project
Installing "cordova-plugin-inappbrowser" for android
Adding cordova-plugin-inappbrowser to package.json
Discovered plugin "cordova-unique-device-id". Adding it to the project
Installing "cordova-unique-device-id" for android
Adding cordova-unique-device-id to package.json
Discovered plugin "cordova-plugin-dialogs". Adding it to the project
Installing "cordova-plugin-dialogs" for android
Adding cordova-plugin-dialogs to package.json
Discovered plugin "cordova-plugin-androidx-adapter". Adding it to the project
Installing "cordova-plugin-androidx-adapter" for android
Adding cordova-plugin-androidx-adapter to package.json
Discovered plugin "cordova-plugin-file". Adding it to the project
Installing "cordova-plugin-file" for android
Subproject Path: CordovaLib
Subproject Path: app

The Android Persistent storage location now defaults to "Internal". Please check this plugin's README to see if your application needs any changes in its config.xml.

If this is a new application no changes are required.

If this is an update to an existing application that did not specify an "AndroidPersistentFileLocation" you may need to add:

      "<preference name="AndroidPersistentFileLocation" value="Compatibility" />"

to config.xml in order for the application to find previously stored files.
        
Adding cordova-plugin-file to package.json
Discovered plugin "cordova-plugin-x-socialsharing-android12". Adding it to the project
Installing "cordova-plugin-x-socialsharing-android12" for android
Installing "es6-promise-plugin" for android
Subproject Path: CordovaLib
Subproject Path: app
Adding cordova-plugin-x-socialsharing-android12 to package.json
Discovered plugin "cordova-plugin-splashscreen". Adding it to the project
Unmet project requirements for latest version of cordova-plugin-splashscreen:
    cordova-android (12.0.1 in project, >=3.6.0 <11.0.0 required)
Fetching highest version of cordova-plugin-splashscreen that this project supports: 6.0.1 (latest is 6.0.2)
Installing "cordova-plugin-splashscreen" for android
Adding cordova-plugin-splashscreen to package.json
cordova-plugin-androidx-adapter: Processed 57 source files in 1181ms
cordova-plugin-firebasex: Preparing Firebase on Android
cordova-plugin-firebasex: Updated colors.xml with accent color

2023-09-15 11:03:20,701 - Output: 
Cordova Packages:

    cli: 12.0.0
        common: 5.0.0
        create: 5.0.0
        lib: 12.0.1
            common: 5.0.0
            fetch: 4.0.0
            serve: 4.0.1

Project Installed Platforms:

    android: 12.0.1

Project Installed Plugins:

    cordova-plugin-androidx-adapter: 1.1.3
    cordova-plugin-appversion: 1.0.0
    cordova-plugin-badge: 0.8.9
    cordova-plugin-camera: 7.0.0
    cordova-plugin-cleartext: 1.0.0
    cordova-plugin-dialogs: 2.0.2
    cordova-plugin-file: 8.0.0
    cordova-plugin-firebasex: 16.1.0
    cordova-plugin-globalization: 1.11.0
    cordova-plugin-inappbrowser: 5.0.0
    cordova-plugin-network-information: 3.0.0
    cordova-plugin-splashscreen: 6.0.1
    cordova-plugin-statusbar: 3.0.0
    cordova-plugin-x-socialsharing-android12: 6.0.5
    cordova-unique-device-id: 1.3.2
    es6-promise-plugin: 4.2.2

Environment:

    OS: Ubuntu 22.04.2 LTS (linux 5.10.0-19-cloud-amd64) x64
    Node: v18.16.0
    npm: 9.7.1

android Environment:

    android:
Loading local repository...                                                     
[=========                              ] 25% Loading local repository...       
[=========                              ] 25% Fetch remote repository...        
[=======================================] 100% Fetch remote repository...       
Available Android targets:
----------
id: 1 or "android-29"
     Name: Android API 29
     Type: Platform
     API level: 29
     Revision: 5
----------
id: 2 or "android-30"
     Name: Android API 30
     Type: Platform
     API level: 30
     Revision: 3
----------
id: 3 or "android-31"
     Name: Android API 31
     Type: Platform
     API level: 31
     Revision: 1
----------
id: 4 or "android-32"
     Name: Android API 32
     Type: Platform
     API level: 32
     Revision: 1
----------
id: 5 or "android-33"
     Name: Android API 33, extension level 3
     Type: Platform
     API level: 33
     Revision: 2


Project Setting Files:

    config.xml:
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" android-versionCode="1220000" id="com.creatactil.coarco" ios-CFBundleVersion="122" version="122">

    <name>COARCO</name>

    <description>
		Cooperativa de Ferreter&#237;as de Canarias
    </description>

    <author href="http://www.creatactil.com" email="info@creatactil.com">
        Creatactil S.L.
    </author>

    <preference name="permissions" value="none" />
    <preference name="orientation" value="portrait" />
	<preference name="fullscreen" value="false" />
    <preference name="target-device" value="universal" />
    <preference name="webviewbounce" value="true" />
    <preference name="prerendered-icon" value="true" />
	<preference name="detect-data-types" value="true" />
	<preference name="show-splash-screen-spinner" value="true" />
	<preference name="exit-on-suspend" value="false" />
    <preference name="android-minSdkVersion" value="22" />
	<preference name="android-targetSdkVersion" value="33" />
    <preference name="android-installLocation" value="auto" />
	<preference name="android-build-tool" value="gradle" />
	<preference name="stay-in-webview" value="true" />
	<preference name="ios-statusbarstyle" value="default" />
	<preference name="EnableViewportScale" value="true" />
	<preference name="MediaPlaybackRequiresUserAction" value="true" />
	<preference name="AllowInlineMediaPlayback" value="true" />
	<preference name="BackupWebStorage" value="cloud" />
	<preference name="TopActivityIndicator" value="gray" />
	<preference name="KeyboardDisplayRequiresUserAction" value="true" />
	<preference name="HideKeyboardFormAccessoryBar" value="true" />
	<preference name="SuppressesIncrementalRendering" value="true" />
	<preference name="ErrorUrl" value="" />
	<preference name="KeepRunning" value="true" />
	<preference name="DisallowOverscroll" value="true" />
	<preference name="LoadingDialog" value=",Cargando....." /> 
	<preference name="LoadUrlTimeoutValue" value="20000" />
	<preference name="StatusBarOverlaysWebView" value="false" />
	<preference name="StatusBarStyle" value="lightcontent" />
	<preference name="SplashScreenDelay" value="3000" />
    <preference name="AutoHideSplashScreen" value="true" />
    <preference name="SplashMaintainAspectRatio" value="true" />
	<preference name="AndroidXEnabled" value="true" />
	<preference name="AndroidWindowSplashScreenAnimatedIcon" value="resources/splashTemplate.png" />
	<preference name="AndroidWindowSplashScreenBackground" value="#000000" />

	<platform name="ios">
	
	    <engine name="ios" spec="6.2.0" />
		
		<feature name="StatusBar">
			<param name="ios-package" value="CDVStatusBar" onload="true" />
		</feature>		
	
		<feature name="SocialSharing">
			<param name="ios-package" value="SocialSharing" />
		</feature>
		
	</platform>
	
	<platform name="android">
	
		<engine name="android" spec="12.0.0" />
		
		<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application/activity">
			<application android:exported="true" />
		</edit-config>
		
		<feature name="SocialSharing">
			<param name="android-package" value="nl.xservices.plugins.SocialSharing" />
		</feature>
		
	</platform>
	
	

	
	<plugin name="cordova-plugin-firebasex" spec="^16.0.0">
        <variable name="SETUP_RECAPTCHA_VERIFICATION" value="true" />
        <variable name="FIREBASE_ANALYTICS_COLLECTION_ENABLED" value="false" />
        <variable name="FIREBASE_PERFORMANCE_COLLECTION_ENABLED" value="false" />
        <variable name="FIREBASE_CRASHLYTICS_COLLECTION_ENABLED" value="false" />
        <variable name="FIREBASE_FCM_AUTOINIT_ENABLED" value="false" />
        <variable name="ANDROID_ICON_ACCENT" value="#FF11FF11" />
        <variable name="ANDROID_FIREBASE_PERFORMANCE_MONITORING" value="false" />
        <variable name="IOS_STRIP_DEBUG" value="true" />
        <variable name="IOS_ENABLE_APPLE_SIGNIN" value="false" />
        <variable name="IOS_USE_PRECOMPILED_FIRESTORE_POD" value="false" />
    </plugin>

	
	

	<platform name="ios">
	  <edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="overwrite">
		<string>Acceso a fotos para enviar a Postventa</string>
	  </edit-config>
	  <edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="overwrite">
		<string>Acceso a fotos para enviar a Postventa</string>
	  </edit-config>
	</platform>
	
	 
	<plugin name="cordova-plugin-camera">
		<variable name="CAMERA_USAGE_DESCRIPTION" value="Acceso a fotos para enviar a Postventa" />
		<variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="Acceso a fotos para enviar a Postventa" />
  	</plugin>
	
	<plugin name="cordova-plugin-globalization" />
	<plugin name="cordova-plugin-network-information" />	
	<plugin name="cordova-plugin-cleartext" />
	<plugin name="cordova-plugin-badge" />
	<plugin name="cordova-plugin-statusbar" />
	<plugin name="cordova-plugin-appversion" />
	<plugin name="cordova-plugin-inappbrowser" />
	<plugin name="cordova-unique-device-id" />
	<plugin name="cordova-plugin-dialogs" />
	<plugin name="cordova-plugin-androidx-adapter" />
	<plugin name="cordova-plugin-file" />
	<plugin name="cordova-plugin-x-socialsharing-android12" />
	<plugin name="cordova-plugin-splashscreen" />
	
	<allow-navigation href="*" />
    <access origin="*" />
	
	<allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
	<allow-intent href="whatsapp:*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
    </platform>

<content src="index.html" /></widget>

    package.json:
--- Start of Cordova JSON Snippet ---
{
  "plugins": {
    "cordova-plugin-firebasex": {
      "SETUP_RECAPTCHA_VERIFICATION": "true",
      "FIREBASE_ANALYTICS_COLLECTION_ENABLED": "false",
      "FIREBASE_PERFORMANCE_COLLECTION_ENABLED": "false",
      "FIREBASE_CRASHLYTICS_COLLECTION_ENABLED": "false",
      "FIREBASE_FCM_AUTOINIT_ENABLED": "false",
      "ANDROID_ICON_ACCENT": "#FF11FF11",
      "ANDROID_FIREBASE_PERFORMANCE_MONITORING": "false",
      "IOS_STRIP_DEBUG": "true",
      "IOS_ENABLE_APPLE_SIGNIN": "false",
      "IOS_USE_PRECOMPILED_FIRESTORE_POD": "false",
      "ANDROID_PLAY_SERVICES_TAGMANAGER_VERSION": "18.0.2",
      "ANDROID_PLAY_SERVICES_AUTH_VERSION": "20.5.0",
      "ANDROID_FIREBASE_ANALYTICS_VERSION": "21.2.2",
      "ANDROID_FIREBASE_MESSAGING_VERSION": "23.1.2",
      "ANDROID_FIREBASE_CONFIG_VERSION": "21.4.0",
      "ANDROID_FIREBASE_PERF_VERSION": "20.3.2",
      "ANDROID_FIREBASE_AUTH_VERSION": "22.0.0",
      "ANDROID_FIREBASE_INAPPMESSAGING_VERSION": "20.3.2",
      "ANDROID_FIREBASE_FIRESTORE_VERSION": "24.6.0",
      "ANDROID_FIREBASE_FUNCTIONS_VERSION": "20.3.0",
      "ANDROID_FIREBASE_IID_VERSION": "21.1.0",
      "ANDROID_FIREBASE_INSTALLATIONS_VERSION": "17.1.3",
      "ANDROID_FIREBASE_CRASHLYTICS_VERSION": "18.3.7",
      "ANDROID_FIREBASE_CRASHLYTICS_NDK_VERSION": "18.3.7",
      "ANDROID_GSON_VERSION": "2.9.0",
      "ANDROID_FIREBASE_PERF_GRADLE_PLUGIN_VERSION": "1.4.2",
      "ANDROID_GRPC_OKHTTP": "1.46.0"
    },
    "cordova-plugin-camera": {
      "CAMERA_USAGE_DESCRIPTION": "Acceso a fotos para enviar a Postventa",
      "PHOTOLIBRARY_USAGE_DESCRIPTION": "Acceso a fotos para enviar a Postventa",
      "ANDROIDX_CORE_VERSION": "1.6.+"
    },
    "cordova-plugin-globalization": {},
    "cordova-plugin-network-information": {},
    "cordova-plugin-cleartext": {},
    "cordova-plugin-badge": {},
    "cordova-plugin-statusbar": {},
    "cordova-plugin-appversion": {},
    "cordova-plugin-inappbrowser": {},
    "cordova-unique-device-id": {},
    "cordova-plugin-dialogs": {},
    "cordova-plugin-androidx-adapter": {},
    "cordova-plugin-file": {
      "ANDROIDX_WEBKIT_VERSION": "1.4.0"
    },
    "cordova-plugin-x-socialsharing-android12": {},
    "cordova-plugin-splashscreen": {}
  },
  "platforms": [
    "android"
  ]
}
--- End of Cordova JSON Snippet ---


2023-09-15 11:03:23,828 - Output: 2023-09-15T11:03:20.840Z cordova-res Paths: (config: '/config.xml') (resources dir: 'resources')
2023-09-15T11:03:20.847Z cordova-res:platform Running android platform with options: {
  'adaptive-icon': {
    icon: { sources: [Array] },
    foreground: { sources: [Array] },
    background: { sources: [Array] }
  },
  icon: {
    sources: [
      '/resources/iconTemplate.png'
    ]
  },
  splash: {
    sources: [
      '/resources/splashTemplate.png'
    ]
  }
}
2023-09-15T11:03:20.848Z cordova-res:platform Building adaptive-icon resources
2023-09-15T11:03:20.848Z cordova-res:platform Building icon resources for android platform
2023-09-15T11:03:20.851Z cordova-res:image Source image for icon: {
  format: 'png',
  size: 20209,
  width: 1024,
  height: 1024,
  space: 'srgb',
  channels: 4,
  depth: 'uchar',
  density: 96,
  isProgressive: false,
  hasProfile: false,
  hasAlpha: true
}
2023-09-15T11:03:20.851Z cordova-res:platform Using '/resources/iconTemplate.png' for icon source image for android
2023-09-15T11:03:20.852Z cordova-res:image Generating 'resources/android/icon/drawable-ldpi-icon.png' (36x36) fit='cover' position='center'
2023-09-15T11:03:20.854Z cordova-res:image Generating 'resources/android/icon/drawable-mdpi-icon.png' (48x48) fit='cover' position='center'
2023-09-15T11:03:20.859Z cordova-res:image Generating 'resources/android/icon/drawable-xhdpi-icon.png' (96x96) fit='cover' position='center'
2023-09-15T11:03:20.859Z cordova-res:image Generating 'resources/android/icon/drawable-xxhdpi-icon.png' (144x144) fit='cover' position='center'
2023-09-15T11:03:20.860Z cordova-res:image Generating 'resources/android/icon/drawable-xxxhdpi-icon.png' (192x192) fit='cover' position='center'
2023-09-15T11:03:20.870Z cordova-res:image Generating 'resources/android/icon/drawable-hdpi-icon.png' (72x72) fit='cover' position='center'
2023-09-15T11:03:20.924Z cordova-res:image Source file missing: resources/android/icon-foreground.png
2023-09-15T11:03:20.925Z cordova-res:image Source file missing: resources/android/icon-foreground.jpg
2023-09-15T11:03:20.925Z cordova-res:image Source file missing: resources/android/icon-foreground.jpeg
2023-09-15T11:03:20.926Z cordova-res:platform Error with adaptive icons: Error
    at new BaseError (/usr/lib/node_modules/cordova-res/dist/error.js:8:22)
    at new ResolveSourceImageError (/usr/lib/node_modules/cordova-res/dist/error.js:45:9)
    at Object.resolveSourceImage (/usr/lib/node_modules/cordova-res/dist/image.js:31:11)
    at async generateAdaptiveIconResourcesPortion (/usr/lib/node_modules/cordova-res/dist/platform.js:190:20)
    at async generateAdaptiveIconResources (/usr/lib/node_modules/cordova-res/dist/platform.js:148:74)
    at async safelyGenerateAdaptiveIconResources (/usr/lib/node_modules/cordova-res/dist/platform.js:128:16)
    at async Object.run (/usr/lib/node_modules/cordova-res/dist/platform.js:24:28)
    at async AsyncFunction.CordovaRes [as run] (/usr/lib/node_modules/cordova-res/dist/index.js:35:36)
    at async AsyncFunction.runCommandLine (/usr/lib/node_modules/cordova-res/dist/index.js:93:28) {
  errors: [],
  code: 'BAD_SOURCES'
}
2023-09-15T11:03:20.926Z cordova-res:platform Building icon resources for android platform
2023-09-15T11:03:20.927Z cordova-res:image Source image for icon: {
  format: 'png',
  size: 20209,
  width: 1024,
  height: 1024,
  space: 'srgb',
  channels: 4,
  depth: 'uchar',
  density: 96,
  isProgressive: false,
  hasProfile: false,
  hasAlpha: true
}
2023-09-15T11:03:20.927Z cordova-res:platform Using '/resources/iconTemplate.png' for icon source image for android
2023-09-15T11:03:20.928Z cordova-res:image Generating 'resources/android/icon/drawable-ldpi-icon.png' (36x36) fit='cover' position='center'
2023-09-15T11:03:20.928Z cordova-res:image Generating 'resources/android/icon/drawable-mdpi-icon.png' (48x48) fit='cover' position='center'
2023-09-15T11:03:20.929Z cordova-res:image Generating 'resources/android/icon/drawable-hdpi-icon.png' (72x72) fit='cover' position='center'
2023-09-15T11:03:20.929Z cordova-res:image Generating 'resources/android/icon/drawable-xhdpi-icon.png' (96x96) fit='cover' position='center'
2023-09-15T11:03:20.933Z cordova-res:image Generating 'resources/android/icon/drawable-xxhdpi-icon.png' (144x144) fit='cover' position='center'
2023-09-15T11:03:20.934Z cordova-res:image Generating 'resources/android/icon/drawable-xxxhdpi-icon.png' (192x192) fit='cover' position='center'
2023-09-15T11:03:20.994Z cordova-res:platform Building splash resources for android platform
2023-09-15T11:03:20.996Z cordova-res:image Source image for splash: {
  format: 'png',
  size: 208041,
  width: 2732,
  height: 2732,
  space: 'srgb',
  channels: 4,
  depth: 'uchar',
  density: 96,
  isProgressive: false,
  background: { r: 0, g: 0, b: 0 },
  hasProfile: true,
  hasAlpha: true,
  icc: <Buffer 00 00 02 a0 6c 63 6d 73 04 30 00 00 6d 6e 74 72 52 47 42 20 58 59 5a 20 07 e5 00 03 00 1e 00 0d 00 08 00 26 61 63 73 70 4d 53 46 54 00 00 00 00 00 00 ... 622 more bytes>
}
2023-09-15T11:03:20.996Z cordova-res:platform Using '/resources/splashTemplate.png' for splash source image for android
2023-09-15T11:03:20.997Z cordova-res:image Generating 'resources/android/splash/drawable-land-ldpi-screen.png' (320x240) fit='cover' position='center'
2023-09-15T11:03:20.997Z cordova-res:image Generating 'resources/android/splash/drawable-land-mdpi-screen.png' (480x320) fit='cover' position='center'
2023-09-15T11:03:20.998Z cordova-res:image Generating 'resources/android/splash/drawable-land-hdpi-screen.png' (800x480) fit='cover' position='center'
2023-09-15T11:03:20.998Z cordova-res:image Generating 'resources/android/splash/drawable-land-xhdpi-screen.png' (1280x720) fit='cover' position='center'
2023-09-15T11:03:20.999Z cordova-res:image Generating 'resources/android/splash/drawable-land-xxhdpi-screen.png' (1600x960) fit='cover' position='center'
2023-09-15T11:03:20.999Z cordova-res:image Generating 'resources/android/splash/drawable-land-xxxhdpi-screen.png' (1920x1280) fit='cover' position='center'
2023-09-15T11:03:21.000Z cordova-res:image Generating 'resources/android/splash/drawable-port-ldpi-screen.png' (240x320) fit='cover' position='center'
2023-09-15T11:03:21.000Z cordova-res:image Generating 'resources/android/splash/drawable-port-mdpi-screen.png' (320x480) fit='cover' position='center'
2023-09-15T11:03:21.001Z cordova-res:image Generating 'resources/android/splash/drawable-port-hdpi-screen.png' (480x800) fit='cover' position='center'
2023-09-15T11:03:21.001Z cordova-res:image Generating 'resources/android/splash/drawable-port-xhdpi-screen.png' (720x1280) fit='cover' position='center'
2023-09-15T11:03:21.001Z cordova-res:image Generating 'resources/android/splash/drawable-port-xxhdpi-screen.png' (960x1600) fit='cover' position='center'
2023-09-15T11:03:21.002Z cordova-res:image Generating 'resources/android/splash/drawable-port-xxxhdpi-screen.png' (1280x1920) fit='cover' position='center'
Generated 18 resources for Android
2023-09-15T11:03:23.791Z cordova-res:cordova:config Orientation preference: undefined
2023-09-15T11:03:23.793Z cordova-res:cordova:config Creating 'icon' node (not found by xpaths: [ "icon[@src][@density='ldpi']" ])
2023-09-15T11:03:23.793Z cordova-res:cordova:config Creating 'icon' node (not found by xpaths: [ "icon[@src][@density='mdpi']" ])
2023-09-15T11:03:23.793Z cordova-res:cordova:config Creating 'icon' node (not found by xpaths: [ "icon[@src][@density='hdpi']" ])
2023-09-15T11:03:23.794Z cordova-res:cordova:config Creating 'icon' node (not found by xpaths: [ "icon[@src][@density='xhdpi']" ])
2023-09-15T11:03:23.794Z cordova-res:cordova:config Creating 'icon' node (not found by xpaths: [ "icon[@src][@density='xxhdpi']" ])
2023-09-15T11:03:23.794Z cordova-res:cordova:config Creating 'icon' node (not found by xpaths: [ "icon[@src][@density='xxxhdpi']" ])
2023-09-15T11:03:23.795Z cordova-res:cordova:config Creating 'splash' node (not found by xpaths: [ "splash[@density='land-ldpi']" ])
2023-09-15T11:03:23.795Z cordova-res:cordova:config Creating 'splash' node (not found by xpaths: [ "splash[@density='land-mdpi']" ])
2023-09-15T11:03:23.795Z cordova-res:cordova:config Creating 'splash' node (not found by xpaths: [ "splash[@density='land-hdpi']" ])
2023-09-15T11:03:23.795Z cordova-res:cordova:config Creating 'splash' node (not found by xpaths: [ "splash[@density='land-xhdpi']" ])
2023-09-15T11:03:23.796Z cordova-res:cordova:config Creating 'splash' node (not found by xpaths: [ "splash[@density='land-xxhdpi']" ])
2023-09-15T11:03:23.796Z cordova-res:cordova:config Creating 'splash' node (not found by xpaths: [ "splash[@density='land-xxxhdpi']" ])
2023-09-15T11:03:23.796Z cordova-res:cordova:config Creating 'splash' node (not found by xpaths: [ "splash[@density='port-ldpi']" ])
2023-09-15T11:03:23.796Z cordova-res:cordova:config Creating 'splash' node (not found by xpaths: [ "splash[@density='port-mdpi']" ])
2023-09-15T11:03:23.796Z cordova-res:cordova:config Creating 'splash' node (not found by xpaths: [ "splash[@density='port-hdpi']" ])
2023-09-15T11:03:23.796Z cordova-res:cordova:config Creating 'splash' node (not found by xpaths: [ "splash[@density='port-xhdpi']" ])
2023-09-15T11:03:23.796Z cordova-res:cordova:config Creating 'splash' node (not found by xpaths: [ "splash[@density='port-xxhdpi']" ])
2023-09-15T11:03:23.796Z cordova-res:cordova:config Creating 'splash' node (not found by xpaths: [ "splash[@density='port-xxxhdpi']" ])
Wrote to config.xml

2023-09-15 11:04:02,928 - Output: The "<splash>" tags were detected and are no longer supported. Please migrate to the "preference" tag "AndroidWindowSplashScreenAnimatedIcon".
cordova-plugin-androidx-adapter: Processed 51 source files in 1126ms
cordova-plugin-firebasex: Preparing Firebase on Android
Checking Java JDK and Android SDK versions
ANDROID_HOME=/opt/android-sdk (recommended setting)
ANDROID_SDK_ROOT=/opt/android-sdk (DEPRECATED)
Using Android SDK: /opt/android-sdk
Reading build config file: /build.json
Reading the keystore from: /agent/voltbuilder/platforms/assets/debug.p12
Starting a Gradle Daemon, 4 incompatible Daemons could not be reused, use --status for details
> Task :wrapper

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/8.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 4s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon, 2 incompatible Daemons could not be reused, use --status for details

> Configure project :app
strippedNativeLibsDir is deprecated and no longer used. Please remove it from your build configuration.

> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
> Task :CordovaLib:preBuild UP-TO-DATE
> Task :CordovaLib:preDebugBuild UP-TO-DATE
> Task :CordovaLib:compileDebugAidl NO-SOURCE
> Task :app:compileDebugAidl NO-SOURCE
> Task :CordovaLib:packageDebugRenderscript
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:generateDebugBuildConfig
> Task :app:generateDebugResValues
> Task :CordovaLib:writeDebugAarMetadata
> Task :app:javaPreCompileDebug
> Task :app:injectCrashlyticsMappingFileIdDebug
> Task :app:checkDebugAarMetadata
> Task :app:processDebugGoogleServices

> Task :CordovaLib:compileDebugRenderscript
The RenderScript APIs are deprecated. They will be removed in Android Gradle plugin 9.0. See the following link for a guide to migrate from RenderScript: https://developer.android.com/guide/topics/renderscript/migrate

> Task :CordovaLib:generateDebugResValues
> Task :CordovaLib:generateDebugResources
> Task :CordovaLib:packageDebugResources
> Task :app:mapDebugSourceSetPaths
> Task :app:generateDebugResources
> Task :app:createDebugCompatibleScreenManifests
> Task :app:extractDeepLinksDebug
> Task :CordovaLib:extractDeepLinksDebug
> Task :CordovaLib:compileDebugLibraryResources
> Task :CordovaLib:processDebugManifest
> Task :CordovaLib:parseDebugLocalResources
> Task :app:mergeDebugResources

> Task :app:processDebugMainManifest FAILED
/platforms/android/app/src/main/AndroidManifest.xml:58:5-81 Error:
	Element uses-permission#android.permission.WRITE_EXTERNAL_STORAGE at AndroidManifest.xml:58:5-81 duplicated with element declared at AndroidManifest.xml:40:5-108
/platforms/android/app/src/main/AndroidManifest.xml Error:
	Validation failed, exiting

See https://developer.android.com/r/studio-ui/build/manifest-merger for more information about the manifest merger.


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed with multiple errors, see logs

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 30s
20 actionable tasks: 20 executed
Command failed with exit code 1: /platforms/android/gradlew -b /platforms/android/build.gradle cdvBuildDebug

2023-09-15 11:04:02,937 - FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed with multiple errors, see logs
See log for full details.
2023-09-15 11:04:02,938 - Build failed 6660fad7-1ccd-4236-800e-02182a1ca030
2023-09-15 11:04:05,209 - Output: Package                      Current  Wanted  Latest  Location                                  Depended by
cordova-plugin-splashscreen    6.0.1   6.0.2   6.0.2  node_modules/cordova-plugin-splashscreen  6660fad7-1ccd-4236-800e-02182a1ca030

Here is the problem:

> Task :app:processDebugMainManifest FAILED
/platforms/android/app/src/main/AndroidManifest.xml:58:5-81 Error:
	Element uses-permission#android.permission.WRITE_EXTERNAL_STORAGE at AndroidManifest.xml:58:5-81 duplicated with element declared at AndroidManifest.xml:40:5-108
/platforms/android/app/src/main/AndroidManifest.xml Error:
	Validation failed, exiting

I would contact the developer of cordova-plugin-camera regarding this issue. It’s likely either a bug in their plugin, or some other plugin. Here’s a workaround that we found that may work for you: Duplicate WRITE_EXTERNAL_STORAGE permissions in AndroidManifest using Cordova 12 for Android 13 - Stack Overflow

1 Like

Thank you very much for the help, at the end the “cordova-plugin-x-socialsharing-android12” was the one that was getting that “permission.WRITE_EXTERNAL_STORAGE”

So I have opted to remove this plugin while waiting to get another socialsharing plugin that works for me.

Problem solved :wink: Thank you very much!