This is probably because of ProGuard… try removing everything from the proguard-rules.pro and test it then. You can also try including the following snippet in the proguard-rules.pro.
-keep public class packageName.classNameOfServicesFile {
public *;
}
The authors of those tools might want to switch to depending on the components.json (plural) descriptor file instead. The component.json (singular) is meant to maintain compatibility with very old versions of AI2, and doesn’t really has any other role.
package com.sgview.demo;
import com.google.appinventor.components.annotations.SimpleFunction;
import com.google.appinventor.components.runtime.AndroidNonvisibleComponent;
import com.google.appinventor.components.runtime.ComponentContainer;
import com.google.appinventor.components.runtime.errors.YailRuntimeError;
import com.google.appinventor.components.runtime.util.YailList;
public class Demo extends AndroidNonvisibleComponent {
public Demo(ComponentContainer container) {
super(container.$form());
}
@SimpleFunction(description = "Returns the sum of the given list of integers.")
public int SumAll(YailList integers) {
int sum = 0;
for (final Object o : integers.toArray()) {
try {
sum += Integer.parseInt(o.toString());
} catch (NumberFormatException e) {
throw new YailRuntimeError(e.toString(), "NumberFormatException");
}
}
return sum;
}
}
Can you try with this version of the JDK instead? Don’t forget to change your environment variables and restart your command prompt for changes to take effect if you put it in a different folder.
Prior to this release, the positioning of extension blocks in the block-editor flyout was uncertain. This is now fixed and blocks should now appear in the same order (in their category) in which they are defined in the source file.
The install script for Linux and macOS is now compatible with most of the Unix shells (like, zsh, Bash, fish, etc.). Previously, it was only executable by Bash.
Migrated extensions will now be stored in a directory named {old_name}-rush to prevent the clashing of old extension files with the new ones.
Bug fixes
Fixed the issue where running the upgrade command would result in a crash. [ref]
Fixed the issue where desugaring would fail if the project path contained spaces. [ref]
Fixed the issue where the extension’s icon won’t be visible in the component palette if it was a remote URL.
Fixed the issue that caused the exec format error: rush error when trying to use Rush on macOS. [ref]
Other changes
Desugaring of Java 8 lang. features is now disabled by default for new extensions. It can be enabled in the metadata file (rush.yml).
Installation
I regret to say this but…you won’t be able to use the rush upgrade command to upgrade Rush this time, as well.
Like previous releases, you will need to run the install scripts this time also. Hopefully, this won’t happen again.
Hello @Shreyash thanks for the update but the newer update has this issue. I am not able to desugar my code properly. Everything was working fine with the previous version. But now I get this issue :
Hello, @Shreyash I am just asking I don’t know much about this that in the future will the aar support come for rush? As currently in app inventor sources they are not giving AAR support. It will be great for extension developers if AAR support will come for rush
As far as I know, you are asking for aar support only because of R.txt file that generates resource references. For that you can use android studio as a workaround to to generate R.class files for you.