Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 102
Registered: ‎04-01-2014
My Device: BlackBerry10 Simulator
My Carrier: none
Accepted Solution

asset should only be packaged once

Hi,

 

I have added icons and splashscreens in different resolutions in the folders assets/icons and assets/images and added them in the Localization tab in the bar-descriptor.xml.

 

But now I get for all this images/icons the warning "Asset should only be packaged once: <path to file>"

 

For example:

"Asset should only be packaged once: S:/BB10/myapp/assets/icons/icon_114x114png"

 

Can someone tell my why this error occurs here? Do I have to place the folder somewhere else?

 

If you need more code please tell me.

New Developer
Posts: 7
Registered: ‎08-04-2014
My Device: BlackBerry Z10 STL100-1
My Carrier: Idea

Re: asset should only be packaged once

[ Edited ]

For different resolution, you have to create directory under assets as like eg. 720x720. It will auto pick up directory/file for device used.

Developer
Posts: 102
Registered: ‎04-01-2014
My Device: BlackBerry10 Simulator
My Carrier: none

Re: asset should only be packaged once

Thanks for the advice, but it still doesn't work.

 

I have created three folders (720x1280, 720x720, 768x1280) for the different resolutions. Inside this folders I now have a folder icons in which I saved the icons like icon_720x1280.png, etc.

But now again when I add the icons in the localization tab i get the same error as before.

Shouldn't there be an instruction on how to add icons for different resolutions? I found this https://developer.blackberry.com/devzone/design/bb10/application_icons.html. But I'm not quite sure why they are telling me this resolutions for the icons. Because when I use them

 

For devices with a screen resolution of 720 x 720 pixels create an icon that is 90 x 90 pixels.

For devices with a screen resolution of 768 x 1280 pixels create an icon that is 110 x 110 pixels.

For devices with a screen resolution of 720 x 1280 pixels create an icon that is 96 x 96 pixels.

 

all the icons will get up-/downscaled. To 114x114 for res 768x1280 and 720x1280 and 94x94 for res 720x720.

 

 

New Developer
Posts: 7
Registered: ‎08-04-2014
My Device: BlackBerry Z10 STL100-1
My Carrier: Idea

Re: asset should only be packaged once

I guess, you have to include seperate qml file inside perticular resolution folder. This QML file will be automatically picked by application. Seperate QML file is required becuase, there will be differnce in layout for perticuler resolution.

Please check sample apps, I remebered that there was an application for traffic light, in which this has been used.

Developer
Posts: 102
Registered: ‎04-01-2014
My Device: BlackBerry10 Simulator
My Carrier: none

Re: asset should only be packaged once

Thanks for the response. I just figured it out.

 

The icons/splashscreens must be in the app-folder directly. Not under assets/720x720, etc.

 

Apparently there should only be the images you use in the qml-files for the different resolutions (I did this in my app and it works fine).

 

Because Splashscreens and icons are global thing that doesn't has to do anything with the content of my app they are not allowed be placed inside a folder.

New Developer
Posts: 7
Registered: ‎08-04-2014
My Device: BlackBerry Z10 STL100-1
My Carrier: Idea

Re: asset should only be packaged once

Thats good... Smiley Happy