cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Bowser (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-11448) Execution failed for task ':mergeDebugResources' - Error: Duplicate resources - Conflict between screen.png and screen.9.png
Date Tue, 21 Jun 2016 21:55:58 GMT

    [ https://issues.apache.org/jira/browse/CB-11448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15342830#comment-15342830
] 

Joe Bowser commented on CB-11448:
---------------------------------

Unfortunately Cordova's CLI itself doesn't have the concept of 9 patch images, because only
Android uses them.  While I'm personally a fan of 9-patch as a solution, it's something that
isn't supported properly by the CLI.  I agree that it should be, however that's more of a
feature request at this point than anything.  I apologize for this, but this is a known issue,
and we don't have a work around for Cordova Lib that I know of.

Another option is using cordova-android itself, and setting up the resources manually.  This
is done with the build scripts in the Cordova Android repository and plugins are installed
using plugman.  If you're only working on one platform, or are looking to use platform-specific
features that would otherwise get messed with with the CLI, this is a possible solution for
you.

> Execution failed for task ':mergeDebugResources' - Error: Duplicate resources - Conflict
between screen.png and screen.9.png
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CB-11448
>                 URL: https://issues.apache.org/jira/browse/CB-11448
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 6.2.0
>         Environment: Mac OS 10.11.5
>            Reporter: Antoine Censi
>              Labels: build, triaged
>
> *Steps to reproduce*
> ```
> rm -rf platforms/android
> cordova platform add android
> cordova build android
> ```
> with `config.xml`
> ```
>         <!-- regular -->
>         <splash density="ldpi" src="assets/splash/android/android-ldpi.9.png"/>
>         <splash density="mdpi" src="assets/splash/android/android-mdpi.9.png"/>
>         <splash density="hdpi" src="assets/splash/android/android-hdpi.9.png"/>
>         <splash density="xhdpi" src="assets/splash/android/android-xhdpi.9.png"/>
>         <splash density="xxhdpi" src="assets/splash/android/android-xxhdpi.9.png"/>
>         <splash density="xxxhdpi" src="assets/splash/android/android-xxxhdpi.9.png"/>
>         <!-- portrait -->
>         <splash density="port-ldpi" src="assets/splash/android/android-ldpi-portrait.9.png"/>
>         <splash density="port-mdpi" src="assets/splash/android/android-mdpi-portrait.9.png"/>
>         <splash density="port-hdpi" src="assets/splash/android/android-hdpi-portrait.9.png"/>
>         <splash density="port-xhdpi" src="assets/splash/android/android-xhdpi-portrait.9.png"/>
>         <splash density="port-xxhdpi" src="assets/splash/android/android-xxhdpi-portrait.9.png"/>
>         <splash density="port-xxxhdpi" src="assets/splash/android/android-xxxhdpi-portrait.9.png"/>
>         <!-- landscape -->
>         <splash density="land-ldpi" src="assets/splash/android/android-ldpi-landscape.9.png"/>
>         <splash density="land-mdpi" src="assets/splash/android/android-mdpi-landscape.9.png"/>
>         <splash density="land-hdpi" src="assets/splash/android/android-hdpi-landscape.9.png"/>
>         <splash density="land-xhdpi" src="assets/splash/android/android-xhdpi-landscape.9.png"/>
>         <splash density="land-xxhdpi" src="assets/splash/android/android-xxhdpi-landscape.9.png"/>
>         <splash density="land-xxxhdpi" src="assets/splash/android/android-xxxhdpi-landscape.9.png"/>
> ```
> *Output*
> ```
> Execution failed for task ':mergeDebugResources'.
> > [drawable-land-xhdpi-v4/screen] /Users/antoine/Sites/attendease-cordova/platforms/android/res/drawable-land-xhdpi/screen.9.png
       [drawable-land-xhdpi-v4/screen] /Users/antoine/Sites/attendease-cordova/platforms/android/res/drawable-land-xhdpi/screen.png:
Error: Duplicate resources
> ...
> ```
> *Documentation*
> http://stackoverflow.com/questions/27547287/android-error-duplicate-resources
> http://stackoverflow.com/questions/27948603/phonegap-generating-both-screen-png-and-screen-9-png-for-splash-screens
(unanswered...)
> Possible hint https://github.com/apache/cordova-android/blob/3a1b4ffcb8857d5bf70dab3b507f0daba3f9130a/bin/templates/cordova/lib/prepare.js#L267
> *Current solution - (not using 9patch screen though - Fail)*
> ```
>         <!-- splash -->
>         <!-- regular -->
>         <splash density="ldpi" src="assets/splash/android/android-ldpi.9.png"/>
>         <splash density="mdpi" src="assets/splash/android/android-mdpi.9.png"/>
>         <splash density="hdpi" src="assets/splash/android/android-hdpi.9.png"/>
>         <splash density="xhdpi" src="assets/splash/android/android-xhdpi.9.png"/>
>         <splash density="xxhdpi" src="assets/splash/android/android-xxhdpi.9.png"/>
>         <splash density="xxxhdpi" src="assets/splash/android/android-xxxhdpi.9.png"/>
>         <!-- portrait -->
>         <!-- <splash density="port-ldpi" src="assets/splash/android/android-ldpi-portrait.9.png"/>
>         <splash density="port-mdpi" src="assets/splash/android/android-mdpi-portrait.9.png"/>
>         <splash density="port-hdpi" src="assets/splash/android/android-hdpi-portrait.9.png"/>
>         <splash density="port-xhdpi" src="assets/splash/android/android-xhdpi-portrait.9.png"/>
>         <splash density="port-xxhdpi" src="assets/splash/android/android-xxhdpi-portrait.9.png"/>
-->
>         <splash density="port-xxxhdpi" src="assets/splash/android/android-xxxhdpi-portrait.9.png"/>
>         <!-- landscape -->
>         <!-- <splash density="land-ldpi" src="assets/splash/android/android-ldpi-landscape.9.png"/>
>         <splash density="land-mdpi" src="assets/splash/android/android-mdpi-landscape.9.png"/>
>         <splash density="land-hdpi" src="assets/splash/android/android-hdpi-landscape.9.png"/>
>         <splash density="land-xhdpi" src="assets/splash/android/android-xhdpi-landscape.9.png"/>
>         <splash density="land-xxhdpi" src="assets/splash/android/android-xxhdpi-landscape.9.png"/>
-->
>         <splash density="land-xxxhdpi" src="assets/splash/android/android-xxxhdpi-landscape.9.png"/>
> ```



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message