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

Adobe AIR Development

Reply
Regular Contributor
JimmyO
Posts: 93
Registered: ‎02-03-2011
My Device: Not Specified

BB10 icon problem. Warning: Using default icon ....

I am trying to package my app using command-line tools, specifically blackberry-airpackager.  The bar-descriptor.xml says:

<icon>
<image>myicon114x114.png</image>
</icon>

 

and the icon is in the same folder as all the other files being packaged (the -app.xml, .swf, .ane, etc).  I specify myicon to be packaged as one of the parameters of the airpackager.

 

I get the warning message: Warning: Using default icon ...\blackberry-tablet-default-icon.png

 

Both myicon.png AND blackberry-tablet-default-icon.png are packaged in the .bar (I know this because I rename it to .zip and open it to look) but ONLY the blackberry-tablet-default-icon.png is used.

 

The only way I can get it to work properly is to rename it and place it in the sdk folders so that it picks up the icon from the sdk folders ... but this seems kludgey.

 

Any hints from anyone on what I might be doing wrong?  Thx in advance.

Developer
UberschallSamsara
Posts: 1,029
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: BB10 icon problem. Warning: Using default icon ....

The icon file name has to include the "114x114" as part of the actual filename on your system; the "114x114" is not

something that gets inferred by convention.  

 

Those "<xdimension>x<ydimension>"names are just suggested convenient mnemonics.

 

Are you by any chance working on WIndows, and does your icon file by any chance have its extension in all

caps (i.e. .PNG instead of .png)?

 

QNX is POSIX compliant and filenames are therefore case sensitive.

Regular Contributor
JimmyO
Posts: 93
Registered: ‎02-03-2011
My Device: Not Specified

Re: BB10 icon problem. Warning: Using default icon ....

Hi and thanks for the reply and suggestions.  I have checked and now double checked all the items you mentioned and still no luck.  

 

My best solution has been to simply have it give me the warning, and substitute my own icon for the 'default' icon in the sdk.

 

...Jim

 

Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: BB10 icon problem. Warning: Using default icon ....

Are you including the icon in the package settings?
If you open the BAR file in a zip utility, is the icon in the BAR file?
Regular Contributor
JimmyO
Posts: 93
Registered: ‎02-03-2011
My Device: Not Specified

Re: BB10 icon problem. Warning: Using default icon ....

yes it does get packaged into the bar properly. Both are there (my .png and the default .png).

 

Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: BB10 icon problem. Warning: Using default icon ....

Normally, I place icons and such in a "assets" directory that is in /src. I have:
<icon>
<image>assets/icons/icon114.png</image>
</icon>
And under Package Contents, I have it checked.
Developer
UberschallSamsara
Posts: 1,029
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: BB10 icon problem. Warning: Using default icon ....

The key is to verify that when you unzip your bar file, the path specified in your bar-descriptor.xml file matches exactly the filename (which is case sensitive), as well as the filepath relative to the air directory in your .bar.

 

So, if your bar-descriptor.xml file says:

 

<icon>
<image>assets/icons/icon114.png</image>
</icon>

 

then the file "icon114.png" needs to have gotten packaged into the air/assets/icons directory in your .bar.

Depending on your build settings you may have set things up to package files with or without a tail path.

Having your icon file exist somewhere in the directory structure that is not exacly the path called out in

bar-descriptor.xml will result in it grabbing the default icon.

Developer
tensioncore
Posts: 326
Registered: ‎12-13-2010
My Device: Bold 9900/Z10 Special Edition

Re: BB10 icon problem. Warning: Using default icon ....

[ Edited ]

I usually just name my icon blackberry-tablet-icon.png

 

and in the bar-descriptor.xml I use the following line:

<icon><image>blackberry-tablet-icon.png</image></icon>

 Nowhere else do I specify this icon or any other icons and my apps always work out fine in the icon-department.:smileyhappy:

CEO/Lead Developer - Tensioncore™ Design Studios
http://tncr.ws/ - ShortenThis!™ for Blackberry Playbook | ShortenThis!™ for BlackBerry® 10
The Periodical Toe A highly informative Table of Elements
DrawThis! A fun drawing app for the BlackBerry® PlayBook™!
http://www.tensioncore.com/ - Tensioncore™ Web Hosting