[ 
https://issues.apache.org/jira/browse/CB-8174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Josh Soref resolved CB-8174.
----------------------------
    Resolution: Duplicate

> Adding Icons does not work properly on BlackBerry10 platform
> ------------------------------------------------------------
>
>                 Key: CB-8174
>                 URL: https://issues.apache.org/jira/browse/CB-8174
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: BlackBerry
>    Affects Versions: 3.6.3
>         Environment: Windows 8
>            Reporter: Oliver Salzburg
>
> Let's assume I created a fresh project with the following commands:
> {code}
> cd /tmp
> cordova create test
> cd test
> cordova platform add blackberry10
> {code}
> I now want to add an icon to this application. The documentation 
> (http://cordova.apache.org/docs/en/4.0.0/config_ref_images.md.html#Icons%20and%20Splash%20Screens)
>  suggests to add an icon directive to the config.xml, so I'll do that. As the 
> documentation suggests, I reference "res/bb10/icon-86.png" and 
> "res/bb10/icon-150.png". I have no created any files in the file system yet.
> When I now run "cordova build", I get several errors:
> {code}
> OliverSalzburg@OLIVER-PC /d/temp/test
> $ cordova build
> cp: no such file or directory: d:\temp\test\res\bb10\icon-86.png
> cp: no such file or directory: d:\temp\test\res\bb10\icon-150.png
> Running command: d:\temp\test\platforms\blackberry10\cordova\build.bat
> [INFO]    Populating application source
> [INFO]    Parsing config.xml
> [INFO]    Generating output files
> [INFO]    Error: Attribute image: file cannot be found in the list of 
> packaged files: res/bb10/icon-86.png
> [ERROR]   Native Packager exception occurred
> [INFO]    Error: Attribute image: file cannot be found in the list of 
> packaged files: res/bb10/icon-86.png
> [ERROR]   Native Packager exception occurred
> An error has occurred
> Error: d:\temp\test\platforms\blackberry10\cordova\build.bat: Command failed 
> with exit code 2
>     at ChildProcess.whenDone 
> (c:\Users\OliverSalzburg.HARTWIG\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:135:23
> )
>     at ChildProcess.emit (events.js:98:17)
>     at maybeClose (child_process.js:756:16)
>     at Process.ChildProcess._handle.onexit (child_process.js:823:5)
> {code}
> The build process expects to see the referenced files relative to the project 
> root. So I'm creating them at the location that cp complained about:
> {code}
> mkdir -p res/bb10
> touch res/bb10/icon-86.png
> touch res/bb10/icon-150.png
> {code}
> Now I build again:
> {code}
> $ cordova build
> Running command: d:\temp\test\platforms\blackberry10\cordova\build.bat
> [INFO]    Populating application source
> [INFO]    Parsing config.xml
> [INFO]    Generating output files
> [INFO]    Error: Attribute image: file cannot be found in the list of 
> packaged files: res/bb10/icon-86.png
> [ERROR]   Native Packager exception occurred
> [INFO]    Error: Attribute image: file cannot be found in the list of 
> packaged files: res/bb10/icon-86.png
> [ERROR]   Native Packager exception occurred
> An error has occurred
> Error: d:\temp\test\platforms\blackberry10\cordova\build.bat: Command failed 
> with exit code 2
>     at ChildProcess.whenDone 
> (c:\Users\OliverSalzburg.HARTWIG\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:135:23
> )
>     at ChildProcess.emit (events.js:98:17)
>     at maybeClose (child_process.js:756:16)
>     at Process.ChildProcess._handle.onexit (child_process.js:823:5)
> {code}
> The package will still complain, because the images still don't exist in the 
> location where it expects it.
> If I'm not misunderstanding, the packager complains here because it didn't 
> find the images relative to the platforms www directory. So it's actually 
> looking in platforms/blackberry10/www/res/bb10 for the files. However, the 
> files obviously don't exist there, because the www directory is re-created 
> during build. For the files to exist there, they would have to exist in the 
> projects root www directory.
> So, something isn't right here. Either the documentation should say that the 
> icons have to placed in the www directory or the build process should copy 
> them there and place the correct entries in the platforms config.xml.



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

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

Reply via email to