getting error When I replace in aiwebres\sss.png.
Whats the difference? o.O
try this... @varsha_naik
@SimpleObject(external = true)
@DesignerComponent(category = ComponentCategory.EXTENSION, description = "Uidesign Extension developed by varsha", iconName = “aiwebres/sss.png”, nonVisible = true, version = 1)
What is difference in both code
I already try getting error skipping icon
Are you using a 16x16 px image?
yes 16*16 px
Are you working with 2 different extensions here?
Packagename and path to .java should match.
no I m only working on one extensions
Have you tried aiwebres\\sss.png
?
No I don’t try this now I’ll try
I tried various combinations now, here’s what I found out.
- Backslashes don’t work at all, neither single or double backslash
- Relative paths and absolute paths do not work at all
- The only way I got it to work is in the form
aiwebres/example.png
, but then the image must be relative toappinventor-sources/appinventor/components/src
in the folderyour/package/aiwebres
IMHO it should be possible to specify absolute or relative paths
The solution is to replace “aiwebres/icon.png” by string with textencoder of image icon. To this, you can use: https://www.base64-image.de/ or other online coder/decoder (data:image/png;base64,…)
I didn't succed to have icon in extension too...
this is my code:
@DesignerComponent(version = 1, description = "gestion appel telephoniques" +
"jm Latour",
category = ComponentCategory.EXTENSION,
nonVisible = true, iconName = "icone/music.png")
@UsesPermissions(permissionNames = "android.permission.ANSWER_PHONE_CALLS")
@SimpleObject(external = true)
and info from ant extensions:
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
[javac] 1 warning
[java]
[java] Extensions : Generating extensions
[java]
[java] Extensions : Generating files [jml.JmlPhoneCall]
[java] Extensions : Skipping missing icon icone/music.png
[java] Extensions : Copying file jml\JmlPhoneCall\JmlPhoneCall.class
[java] Extensions : Successfully created jml.JmlPhoneCall build info file
[java] Extensions : Successfully created jml.JmlPhoneCall extension properties file
BUILD SUCCESSFUL
as Varsha_naik, i tried with absolute path without any change
![image](https://community.appinventor.mit.edu/uploads/default/original/3X/3/8/38808ecac0282d4066e3e5a97dd590d7461cf62d.png)
is somebody can help ?
Extension. iconName.
A good way to insert the iconName is the one commented by @Jorge_Gaspar
1.- Enter:
2.- Upload your 18x18 icon and turn it into Base64.
3.- Insert that code Base64 in
iconName = "data:image/png;base64,iVBORw0KG...............")
In the same directory as you have the extension java file, create a directory "aiwebres", and put the icon there. It works for me in Windows.
my icon is in a directory named "icone". i tried to rename it "aiwebres" but no change !
this directory is where i have java file
I tried with an icon from internet
but same result. it seems it's not my icon the trouble
Juan_Antonio i tested your solution.
i get code:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABNSURBVDhPY/z//z8D0eDVq1dMUCbRgPYa0P2wdOlSKAsMoqOjoSwwAPqB2p5GsxAIKPM00DxkIzGNBwL6Byt+MEiTxsuXL6FMYgADAwBeliR/wJ+5NgAAAABJRU5ErkJggg==
but same result:
[java] Extensions : Generating files [jml.Pitagoras]
[java] Extensions : Skipping missing icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABNSURBVDhPY/z//z8D0eDVq1dMUCbRgPYa0P2wdOlSKAsMoqOjoSwwAPqB2p5GsxAIKPM00DxkIzGNBwL6Byt+MEiTxsuXL6FMYgADAwBeliR/wJ+5NgAAAABJRU5ErkJggg==
[java] Extensions : Copying file jml\Pitagoras\Pitagoras.class
[java] Extensions : Successfully created jml.Pitagoras build info file
[java] Extensions : Successfully created jml.Pitagoras extension properties file