Important information for extension developers

455 views
Skip to first unread message

Evan Patton

unread,
May 25, 2017, 12:50:43 PM5/25/17
to App Inventor Open Source Development
With our upcoming IOT release there will be some improvements to how extensions work:

1) Extension bundles: If you have two or more extension in the same package, they will be put into a single .aix file named with the package. When you import this .aix into App Inventor, you will get multiple extensions listed in the palette. This allows extension developers to group related extensions into a single package rather than asking users to upload many extensions. It also cuts down on the time needed to package up AIA and build server requests by reducing the number of files in a project.

2) Extension icons: Until now, icons needed to be compiled as part of the MIT App Inventor build or hosted externally using an HTTP or HTTPS URL. Now it is possible to include icons in the extension. To do so, create a directory aiwebres in the same package as the extension. Add a PNG file for the icon, and name it in the iconName field of the @DesignerComponent annotation, for example "aiwebres/icon.png". When the extension is packaged it will be pulled into the AIX and the SimplePaletteItem will correctly load the icon from the MIT App Inventor server.

3) Extension properties: There is a Bluetooth component property type that is used by the LEGO MINDSTORMS code to limit selection of a component to a BluetoothClient component. We have extended this functionality for our IOT work so that you can now name a component by its fully-qualified class name and the list of current components will be restricted to only those components that are instances of the named class. This can be useful for having multiple extensions that connect to one another in some meaningful way. For example, we use this in our Arduino and Micro:bit extension to limit the BluetoothDevice property to BluetoothLE instances. To take advantage of this, set the editorType of the @DesignerProperty annotation to PropertyTypeConstants.PROPERTY_TYPE_COMPONENT + ":" + the fully qualified class name of the target component type.

4) Extension loading: We have improved extension loading in the companion so that multiple extensions can link with one another for more complex extension interactions. For example, we can have one extension call methods in another extension's classes. Extensions may also be imported/upgraded after connecting the companion if using the ai2-test server with companion 2.41t2 or higher.

5) Extension help URLs: The @DesignerComponent annotation now has a helpUrl field that can be used to specify a URL for documentation. This will be used to populate the href attribute of the "More information" link that appears in the palette help when user's click on the ? icon. If no helpUrl is provided the link will no longer appear.

If you have any questions, concerns, or suggestions, please let us know.

Cheers,
Evan Patton

Hossein Amerkashi

unread,
May 25, 2017, 1:12:38 PM5/25/17
to app-inventor-o...@googlegroups.com
Nice improvements.

Thanks

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsub...@googlegroups.com.
To post to this group, send email to app-inventor-open-source-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/app-inventor-open-source-dev.
For more options, visit https://groups.google.com/d/optout.

Abraham Getzler

unread,
May 25, 2017, 1:30:45 PM5/25/17
to app-inventor-o...@googlegroups.com
Does the Power Users Group include the major Arduino posters?
ABG

Nice improvements.

Thanks

To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsubs...@googlegroups.com.

Evan Patton

unread,
May 25, 2017, 1:57:38 PM5/25/17
to App Inventor Open Source Development
Hi ABG,

Some, but not all. We've also been reaching out to individuals posting on the public forum who have been asking questions about Bluetooth LE specifically. If you have any suggestions for candidates to do testing we are glad to expand the test cohort.

Evan

On Thursday, May 25, 2017 at 1:30:45 PM UTC-4, Abraham Getzler wrote:
Does the Power Users Group include the major Arduino posters?
ABG
On Thu, May 25, 2017 at 1:12 PM, Hossein Amerkashi <kkas...@gmail.com> wrote:
Nice improvements.

Thanks

On May 25, 2017 12:50 PM, "Evan Patton" <ewpa...@gmail.com> wrote:
With our upcoming IOT release there will be some improvements to how extensions work:

1) Extension bundles: If you have two or more extension in the same package, they will be put into a single .aix file named with the package. When you import this .aix into App Inventor, you will get multiple extensions listed in the palette. This allows extension developers to group related extensions into a single package rather than asking users to upload many extensions. It also cuts down on the time needed to package up AIA and build server requests by reducing the number of files in a project.

2) Extension icons: Until now, icons needed to be compiled as part of the MIT App Inventor build or hosted externally using an HTTP or HTTPS URL. Now it is possible to include icons in the extension. To do so, create a directory aiwebres in the same package as the extension. Add a PNG file for the icon, and name it in the iconName field of the @DesignerComponent annotation, for example "aiwebres/icon.png". When the extension is packaged it will be pulled into the AIX and the SimplePaletteItem will correctly load the icon from the MIT App Inventor server.

3) Extension properties: There is a Bluetooth component property type that is used by the LEGO MINDSTORMS code to limit selection of a component to a BluetoothClient component. We have extended this functionality for our IOT work so that you can now name a component by its fully-qualified class name and the list of current components will be restricted to only those components that are instances of the named class. This can be useful for having multiple extensions that connect to one another in some meaningful way. For example, we use this in our Arduino and Micro:bit extension to limit the BluetoothDevice property to BluetoothLE instances. To take advantage of this, set the editorType of the @DesignerProperty annotation to PropertyTypeConstants.PROPERTY_TYPE_COMPONENT + ":" + the fully qualified class name of the target component type.

4) Extension loading: We have improved extension loading in the companion so that multiple extensions can link with one another for more complex extension interactions. For example, we can have one extension call methods in another extension's classes. Extensions may also be imported/upgraded after connecting the companion if using the ai2-test server with companion 2.41t2 or higher.

5) Extension help URLs: The @DesignerComponent annotation now has a helpUrl field that can be used to specify a URL for documentation. This will be used to populate the href attribute of the "More information" link that appears in the palette help when user's click on the ? icon. If no helpUrl is provided the link will no longer appear.

If you have any questions, concerns, or suggestions, please let us know.

Cheers,
Evan Patton

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsub...@googlegroups.com.
To post to this group, send email to app-inventor-o...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsub...@googlegroups.com.
To post to this group, send email to app-inventor-o...@googlegroups.com.

Abraham Getzler

unread,
May 25, 2017, 2:23:39 PM5/25/17
to app-inventor-o...@googlegroups.com
The authors of the Arduino or BLE projects on my FAQ would probably qualify ...

ABG

On Thu, May 25, 2017 at 1:57 PM, Evan Patton <ewpa...@gmail.com> wrote:
Hi ABG,

Some, but not all. We've also been reaching out to individuals posting on the public forum who have been asking questions about Bluetooth LE specifically. If you have any suggestions for candidates to do testing we are glad to expand the test cohort.

Evan

On Thursday, May 25, 2017 at 1:30:45 PM UTC-4, Abraham Getzler wrote:
Does the Power Users Group include the major Arduino posters?
ABG
On Thu, May 25, 2017 at 1:12 PM, Hossein Amerkashi <kkas...@gmail.com> wrote:
Nice improvements.

Thanks

On May 25, 2017 12:50 PM, "Evan Patton" <ewpa...@gmail.com> wrote:
With our upcoming IOT release there will be some improvements to how extensions work:

1) Extension bundles: If you have two or more extension in the same package, they will be put into a single .aix file named with the package. When you import this .aix into App Inventor, you will get multiple extensions listed in the palette. This allows extension developers to group related extensions into a single package rather than asking users to upload many extensions. It also cuts down on the time needed to package up AIA and build server requests by reducing the number of files in a project.

2) Extension icons: Until now, icons needed to be compiled as part of the MIT App Inventor build or hosted externally using an HTTP or HTTPS URL. Now it is possible to include icons in the extension. To do so, create a directory aiwebres in the same package as the extension. Add a PNG file for the icon, and name it in the iconName field of the @DesignerComponent annotation, for example "aiwebres/icon.png". When the extension is packaged it will be pulled into the AIX and the SimplePaletteItem will correctly load the icon from the MIT App Inventor server.

3) Extension properties: There is a Bluetooth component property type that is used by the LEGO MINDSTORMS code to limit selection of a component to a BluetoothClient component. We have extended this functionality for our IOT work so that you can now name a component by its fully-qualified class name and the list of current components will be restricted to only those components that are instances of the named class. This can be useful for having multiple extensions that connect to one another in some meaningful way. For example, we use this in our Arduino and Micro:bit extension to limit the BluetoothDevice property to BluetoothLE instances. To take advantage of this, set the editorType of the @DesignerProperty annotation to PropertyTypeConstants.PROPERTY_TYPE_COMPONENT + ":" + the fully qualified class name of the target component type.

4) Extension loading: We have improved extension loading in the companion so that multiple extensions can link with one another for more complex extension interactions. For example, we can have one extension call methods in another extension's classes. Extensions may also be imported/upgraded after connecting the companion if using the ai2-test server with companion 2.41t2 or higher.

5) Extension help URLs: The @DesignerComponent annotation now has a helpUrl field that can be used to specify a URL for documentation. This will be used to populate the href attribute of the "More information" link that appears in the palette help when user's click on the ? icon. If no helpUrl is provided the link will no longer appear.

If you have any questions, concerns, or suggestions, please let us know.

Cheers,
Evan Patton

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsubs...@googlegroups.com.
To post to this group, send email to app-inventor-o...@googlegroups.com.
Visit this group at https://groups.google.com/group/app-inventor-open-source-dev.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsubs...@googlegroups.com.
To post to this group, send email to app-inventor-o...@googlegroups.com.
Visit this group at https://groups.google.com/group/app-inventor-open-source-dev.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsub...@googlegroups.com.
To post to this group, send email to app-inventor-open-source-dev@googlegroups.com.

Evan Patton

unread,
May 25, 2017, 4:46:52 PM5/25/17
to App Inventor Open Source Development
I should also point out that you can test these new additions using the latest master branch and the ai2-test.appinventor.mit.edu server.

Evan

Pavitra Golchha

unread,
May 26, 2017, 2:46:04 AM5/26/17
to App Inventor Open Source Development
Is Android API level upgraded?

Evan Patton

unread,
May 26, 2017, 11:28:44 AM5/26/17
to App Inventor Open Source Development
Hi Pavitra,

We are working on an upgrade path to 7.1.1, but it will take some time because we need to do some significant refactoring of existing components due to the change in the permission model from 5.1.1 to 6.0 and a number of APIs have been deprecated or removed. Once we are a little bit closer to a release there will be community testing on ai2-test so that we can identify any problem points.

Evan


On Friday, May 26, 2017 at 2:46:04 AM UTC-4, Pavitra Golchha wrote:
Is Android API level upgraded?
Message has been deleted

Pavitra Golchha

unread,
May 28, 2017, 3:23:26 PM5/28/17
to App Inventor Open Source Development
Hi Evan,

I started updating some of my extensions and just saw that on importing new version, the extension didn't upgrade. Instead, I got a dialog box saying that I have been adding duplicate extension. 

So, after deleting old extension and importing new one again, it doesn't show Class name, but it used the last word after dot from the package name. For eg, it take pavitra from com.pavitra (package name), where the class name is Arduino.

In my opinion, I think you should make some modifications in this point quoted below.
 
1) Extension bundles: If you have two or more extension in the same package, they will be put into a single .aix file named with the package. When you import this .aix into App Inventor, you will get multiple extensions listed in the palette. This allows extension developers to group related extensions into a single package rather than asking users to upload many extensions. It also cuts down on the time needed to package up AIA and build server requests by reducing the number of files in a project.

 I mean it maybe good for multiple extensions, but is not useful for single extensions. 

Evan Patton

unread,
May 28, 2017, 3:52:12 PM5/28/17
to App Inventor Open Source Development
Hi Pavitra,

On Sunday, May 28, 2017 at 3:23:26 PM UTC-4, Pavitra Golchha wrote:
Hi Evan,

I started updating some of my extensions and just saw that on importing new version, the extension didn't upgrade. Instead, I got a dialog box saying that I have been adding duplicate extension. 

Was this in a fresh project or a project from before nb156? Does it show two extensions in the palette or is the message wrong?
 

So, after deleting old extension and importing new one again, it doesn't show Class name, but it used the last word after dot from the package name. For eg, it take pavitra from com.pavitra (package name), where the class name is Arduino.

Do you mind sharing the extension? Is this extension built with the latest master? It should be taking the name from the name field in the components.json file.
 

In my opinion, I think you should make some modifications in this point quoted below.
 
1) Extension bundles: If you have two or more extension in the same package, they will be put into a single .aix file named with the package. When you import this .aix into App Inventor, you will get multiple extensions listed in the palette. This allows extension developers to group related extensions into a single package rather than asking users to upload many extensions. It also cuts down on the time needed to package up AIA and build server requests by reducing the number of files in a project.

 I mean it maybe good for multiple extensions, but is not useful for single extensions. 

The behavior for single extensions from the point of view of App Inventor users ought to be the same. Any deviations are bugs that we need to address.

Evan
Message has been deleted

Pavitra Golchha

unread,
May 28, 2017, 5:32:26 PM5/28/17
to App Inventor Open Source Development
Sorry, it's my fault. It works well as expected. There's nothing wrong with App Inventor.

Evan Patton

unread,
Jun 15, 2017, 7:35:11 PM6/15/17
to App Inventor Open Source Development
Just as a follow-up to this. Starting with companion release 2.42 released on 2017-06-14, extension developers can now report errors via the Screen.ErrorOccurred event using the constant ErrorMessages.ERROR_EXTENSION_ERROR. Additional arguments that will need to be pass for the format string are (1) an integer value to indicate an error code specific to the extension (only significant to the extension developer, e.g., 9001), (2) a String naming the extension (e.g., "BluetoothLE"), and (3) a string with a textual description for the error (e.g., "Device index out of bounds"). The goal is to make it easier to report extension errors through the existing error handling mechanisms in App Inventor. As part of this release, all of the items mentioned in the earlier post are now available on the production instance as well. If you have any issues, please let us know as soon as possible so we can address them.

Thanks,
Evan

On Thursday, May 25, 2017 at 12:50:43 PM UTC-4, Evan Patton wrote:

Sander Jochems

unread,
Jul 1, 2017, 5:19:09 AM7/1/17
to App Inventor Open Source Development
Which commit do we need to use to build extensions?

Evan W. Patton

unread,
Jul 1, 2017, 7:27:52 AM7/1/17
to app-inventor-o...@googlegroups.com
Hi Sander,

You can use the master branch for building extensions.

Evan

On Jul 1, 2017, at 05:19, Sander Jochems <sander54...@gmail.com> wrote:

Which commit do we need to use to build extensions?

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-so...@googlegroups.com.

Moliata

unread,
Jul 1, 2017, 11:35:10 AM7/1/17
to App Inventor Open Source Development
The problem is that he cannot use latest commit. Same as me, I had to roll back to older commit in order to use ant extensions & ant. The thing is that latest commit has issue with Blockly. Commit that we download, needs Google Blockly closure library, which is somehow, not added together with App Inventor sources. We have to download closure library & add that library to a specific path. Also, you should fix issue with Lego MINDSTORMS components. Problem is that we manually have to remove ©, because of wrong charset. Although, still thank you for your great job building such amazing open source platform, good luck for you guys. Kind regards.

Evan W. Patton

unread,
Jul 1, 2017, 11:58:04 AM7/1/17
to app-inventor-o...@googlegroups.com
If that's the case, please see the "Checkout Dependency" section of the README.md: https://github.com/mit-cml/appinventor-sources/blob/master/README.md

It has explicit directions about getting the dependencies. If you simply downloaded the Blockly library from Google you may be missing features that are App Inventor specific.

Try replacing the copyright symbol with &copy;. If that works we can probably make the substitution to deal with the fact the some folks aren't using UTF-8 as the default charset. However all of the translation files are also UTF-8 so you are likely going to have a bad time. 

Evan

On Jul 1, 2017, at 11:35, Moliata <benas...@gmail.com> wrote:

The problem is that he cannot use latest commit. Same as me, I had to roll back to older commit in order to use ant extensions & ant. The thing is that latest commit has issue with Blockly. Commit that we download, needs Google Blockly closure library, which is somehow, not added together with App Inventor sources. We have to download closure library & add that library to a specific path. Also, you should fix issue with Lego MINDSTORMS components. Problem is that we manually have to remove ©, because of wrong charset. Although, still thank you for your great job building such amazing open source platform, good luck for you guys. Kind regards.

Sander Jochems

unread,
Jul 1, 2017, 4:01:24 PM7/1/17
to App Inventor Open Source Development
I keep getting this error:

BlocklyCompile:
     
[java] Exception in thread "main" java.lang.IllegalArgumentException: File not found at: C:\AppInventor\appinventor-sources\appinventor\blocklyeditor\..\lib\closure-library\closure\goog
     
[java]     at com.google.common.base.Preconditions.checkArgument(Preconditions.java:88)
     
[java]     at org.plovr.Manifest.getInputs(Manifest.java:393)
     
[java]     at org.plovr.Manifest.getFiles(Manifest.java:369)
     
[java]     at org.plovr.Manifest.getFiles(Manifest.java:363)
     
[java]     at org.plovr.Manifest.getAllDependencies(Manifest.java:324)
     
[java]     at org.plovr.Manifest.getInputsInCompilationOrder(Manifest.java:193)
     
[java]     at org.plovr.Manifest.getCompilerArguments(Manifest.java:177)
     
[java]     at org.plovr.CompileRequestHandler.compile(CompileRequestHandler.java:94)
     
[java]     at org.plovr.cli.BuildCommand.runCommandWithOptions(BuildCommand.java:58)
     
[java]     at org.plovr.cli.BuildCommand.runCommandWithOptions(BuildCommand.java:31)
     
[java]     at org.plovr.cli.AbstractCommandRunner.runCommand(AbstractCommandRunner.java:41)
     
[java]     at org.plovr.cli.Command.execute(Command.java:47)
     
[java]     at org.plovr.cli.Main.mainWithExitCode(Main.java:56)
     
[java]     at org.plovr.cli.Main.main(Main.java:30)


BUILD FAILED
C
:\AppInventor\appinventor-sources\appinventor\build.xml:16: The following error occurred while executing this line:
C
:\AppInventor\appinventor-sources\appinventor\build-common.xml:284: The following error occurred while executing this line:


Sander Jochems

unread,
Jul 1, 2017, 4:13:36 PM7/1/17
to App Inventor Open Source Development
When I do ant extensions, then it compiles only the first file in the folder

components\scr\com\sanderjochems\BluetoothPlus.java

After compile

components\build\extensions\com.sanderjochems.aix

Moliata

unread,
Jul 1, 2017, 4:36:58 PM7/1/17
to App Inventor Open Source Development
I just cloned your sources, but it didn't work. I had to change © to &copy; & also, I had to manually download closure-library. Only afterwards it started working.

Evan W. Patton

unread,
Jul 1, 2017, 5:18:30 PM7/1/17
to app-inventor-o...@googlegroups.com
Hi Sander,

This indicates to me that you did not perform the command:

git submodule update --init

From the section on dependency checkout. If you do this it will retrieve the Blockly and Closure Compiler dependencies and you will be able to proceed beyond this step.

Evan

Sander Jochems

unread,
Jul 1, 2017, 5:45:14 PM7/1/17
to App Inventor Open Source Development
I used that command, just like all the others there are in the README.md

Evan W. Patton

unread,
Jul 1, 2017, 9:01:19 PM7/1/17
to app-inventor-o...@googlegroups.com
What is the output of:

git submodule deinit .
git submodule update --init

This should reconfigure the Blockly and closure compiler submodules.

Evan

On Jul 1, 2017, at 17:45, Sander Jochems <sander54...@gmail.com> wrote:

I used that command, just like all the others there are in the README.md

--

Sander Jochems

unread,
Jul 2, 2017, 5:07:44 AM7/2/17
to App Inventor Open Source Development
When I do ant, then it works. But after I did ant extensions this happens:

components\src\com\sanderjochems\










components\build\extensions\






When I put that extension in App Inventor, then it works as the BluetoothPlus extension. Why does this happen?

Sander Jochems

unread,
Jul 2, 2017, 5:46:38 AM7/2/17
to App Inventor Open Source Development
It works all! :)

Thanks to the great help at https://community.thunkable.com/

Evan W. Patton

unread,
Jul 2, 2017, 9:03:28 AM7/2/17
to app-inventor-o...@googlegroups.com
The behavior you were experiencing is expected. The extensions are now named by package rather than class name so that multiple extensions can be placed in the same aix (part of our IOT release). The file name of the aix is irrelevant to what is displayed in App Inventor--that will be the class name.

What exactly was it that you found out via Thunkable that was blocking you here?

Evan

On Jul 2, 2017, at 05:46, Sander Jochems <sander54...@gmail.com> wrote:

It works all! :)

Thanks to the great help at https://community.thunkable.com/

--

Sander Jochems

unread,
Jul 2, 2017, 11:22:07 AM7/2/17
to App Inventor Open Source Development
Someone told me that there was a new extensions compile system

Moliata

unread,
Jul 9, 2017, 3:05:47 AM7/9/17
to App Inventor Open Source Development
Evan, hello. Same stuff with submodules happened to me, so I had to add submodules by myself with git submodule add .....

Ulli

unread,
Jan 14, 2019, 6:42:13 AM1/14/19
to App Inventor Open Source Development
Hi Evan,

you wrote


2) Extension icons: Until now, icons needed to be compiled as part of the MIT App Inventor build or hosted externally using an HTTP or HTTPS URL. Now it is possible to include icons in the extension. To do so, create a directory aiwebres in the same package as the extension. Add a PNG file for the icon, and name it in the iconName field of the @DesignerComponent annotation, for example "aiwebres/icon.png". When the extension is packaged it will be pulled into the AIX and the SimplePaletteItem will correctly load the icon from the MIT App Inventor server.

I tried several times to provide my extension with an icon. Unfortunately not successful. Also google did not help. The only place with reasonable content is this one.

I am using a Windows 10 PC. I've installed appinventor according to this tutorial: http://kio4.com/appinventor/125B_extensiones_crear_i.htm.

My sources are in the folder "~ appinventor-sources / appinventor / components / src / com / google / appinventor / components / runtime".

I start the build process with git-bash: "ant extesnsions" ant current directory "~ / appinventor-sources / appinventor". The build is successful and the extension (.aix) is created. When I import this extension into App Inventor, there is no icon: - (((

Where exactly do I have to provide the icon that it will be integrated? Or are there other steps necessary?

Kind Regards
Ulli

Evan Patton

unread,
Jan 14, 2019, 10:33:21 AM1/14/19
to App Inventor Open Source Development
Hi Ulrich,

It's a bit hard to debug without being able to see your sources, but check the following:

1. You should have an aiwebres directory at the same level as your extension's .java file.
2. The icon should be a 16x16 PNG file placed within the aiwebres directory.
3. In the @DesignerComponent annotation, the iconName field should be "aiwebres/ICONNAME.png" where ICONNAME is the filename for the icon. I would advise against using a name with spaces.
4. After compiling the AIX file, confirm presence of the icon in the aiwebres directory by opening the AIX with your preferred ZIP utility.

For a complete example, take a look at how the Arduino101 extension is structured.

Regards,
Evan

Ulrich Bien

unread,
Jan 14, 2019, 12:52:41 PM1/14/19
to App Inventor Open Source Development
Hi Evan,

thanks for the hint. I followed your advices but did not succeed. No automatic insertion of the image.

My sources are in the folder "~/appinventor-sources/appinventor/components/src/com/google/appinventor/components/runtime". I added folder
"~/appinventor-sources/appinventor/components/src/com/google/appinventor/components/runtime/aiwebres" and copied the icon to it.
The corresponding source code snippet is:
@DesignerComponent(...  iconName = "aiwebres/events.png")

The built .aix did not contain the image.

I have found a built Arduino101.aix and saw how the folder structure has to be:
<package-name>
   aiwebres (folder)
        <images>
   files (folder)
   classes.jar
   ...

I copied the "aiwebres" folder to my built aix file. After import to App Inventor the specified icon was shown.

That's a good work around, but a bit awkward. May be you hav another hint.

Kind regards, Ulrich

Evan Patton

unread,
Jan 14, 2019, 1:00:33 PM1/14/19
to App Inventor Open Source Development
So two things there. 1) It might be due to the fact that your extension is in com.google.appinventor.components.runtime. This is no longer supported, and you should move it to another package. Do you still see the problem if you move your sources elsewhere? 2) Have you recently merged master, or are you working off a recent enough version of master? If this extension has been around for a while, you might need to merge a new enough version of master that has the functionality to copy the aiwebres directory.

Regards,
Evan

Ulrich Bien

unread,
Jan 14, 2019, 1:40:52 PM1/14/19
to App Inventor Open Source Development
I got the newest version of App Inventor this morning.

I switched to a new path. Building the extensions generates the .aix files, but with no image inside. These are my paths:

ai2.png


Evan W. Patton

unread,
Jan 14, 2019, 2:02:18 PM1/14/19
to app-inventor-o...@googlegroups.com
Hmm. If you search through your build log, do you see the string “Skipping missing icon”? One possibility is that the path separator is causing issues on Windows. 

Regards,
Evan


On Jan 14, 2019, at 13:40, Ulrich Bien <bieno...@gmx.de> wrote:

I got the newest version of App Inventor this morning.

I switched to a new path. Building the extensions generates the .aix files, but with no image inside. These are my paths:

<ai2.png>


--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-so...@googlegroups.com.
To post to this group, send email to app-inventor-o...@googlegroups.com.
Visit this group at https://groups.google.com/group/app-inventor-open-source-dev.
For more options, visit https://groups.google.com/d/optout.
<ai2.png>

Ulrich Bien

unread,
Jan 14, 2019, 2:32:31 PM1/14/19
to App Inventor Open Source Development
I directed the output of the build process to a file (s. appendix).

Near the end there ist the message

    [java] Extensions : Skipping missing icon aiwebres/events.png

May be there is still something wrong with the paths.

Concerning the App Inventor version, got it at 9pm (is about 1pm in USA) with this command:

report.txt

Ulrich Bien

unread,
Jan 14, 2019, 3:16:58 PM1/14/19
to App Inventor Open Source Development
It works now!!!!
I'm sorry, it was my fault.

First there was an open editor for the source at the old file position. When saving the file, the editor restored it to the old position i.e. com.google.appinventor.components.runtime.

After correcting this I overlooked that there was a build error, a null-pointer.exception in one of the programs that builds the extension. But ant had reported "BUILD SUCCESSFUL". The extension was incomplete.

I deleted everything that did not belong directly to the one extension I'm testing. Now it's working. I will add the other extensions piece by piece again and see where the problem is.

Thanks for your help and your patience
Ulrich


Reply all
Reply to author
Forward
0 new messages