Rush • A new and improved way of building extensions

This is a known bug, where the build caches don’t invalidate after you remove dependencies. For now, deleting the build folder for your extension, which can be found inside $RUSH_DATA_DIR/workspaces, should fix this.

I think you should add clean command similar to Extension Template.

2 Likes

I have installed JDK 1.8 and added the %JAVA_HOME% variable correctly?

then why this error occurs?

How to fix this??

Try running javac -version and see the results.

For me, it returns:

javac 1.8.0_331

On my laptop, the two commands worked but javac did not, and I encountered the same error as you. Then I changed some things and javac was working, and the extensions are now compiling.

So what do I need to change? because my laptop doesn’t display the javac -version you described above… I need your help.

What does it say?

1 Like

You need to install JDK 8.

1 Like

How I can update or specify the Kotlin version in Rush for creating extension in Kotlin?

The error message you are getting is telling you that the Kotlin classes that you are trying to use are compiled with an incompatible version of Kotlin. This means that the versions of Kotlin that the classes were compiled with and the version of Kotlin that you are using to run your code are different.

1 Like

weren’t there plans to integrate python the? Could this be done with Jython, for example?
Jython link

There were no plans whatsoever to integrate Python or Jython into Rush.

Is it possible use Rush with termux in android device

I 'm building an extension in Rush - all ок. If make "Export - Android APK (in Kodular.io) " - I get errors:

Kodular is unable to compile this project.
The compiler error output was
________Preparing application icon
________Creating animation xml
________Creating fragment xml
________Creating listview xml in res/layout/…
________Creating listview xml in res/layout-v21/…
________Creating xml in res/drawable/…
________Creating splash png in res/drawable/…
________Creating colors xml
________Creating styles xml
________Creating drawables xml v21
________Checking for firebase
________Creating provider_path xml
________Creating network_security_config xml
________Generating adaptive icon file
________Generating round adaptive icon file
________Generating adaptive icon background file
________Generating manifest file
________Attaching native libraries
________Attaching Android Archive (AAR) libraries
________Attaching component assets
________Invoking AAPT
AAPT time: 1.288 seconds
________Compiling source files
(compiling io/kodular/was6748/test/Screen1.yail to io.kodular.was6748.test.Screen1)
(compiling /tmp/runtime3730180970630236487.scm to com.google.youngandroid.runtime)
Kawa compile time: 2.199 seconds
________Invoking DX
DX time: 5.273 seconds
________Invoking ApkBuilder
com.android.sdklib.build.ApkCreationException: Failed to add /tmp/1696785026675_0.5982199738635251-0/youngandroidproject/…/build/tmp/classes2.dex
YAIL compiler - ApkBuilder failed.

My Ruch-files (include library and .aix)

when adding any of these lines in .kt:
import com.

I get an error when building .apk

@woo_ask

When building extensions with Kotlin, it is necessary to generate a release build otherwise the extension won’t work in Kodular. To generate a release build, pass the -r (--release) flag when building the extension:

rush build -r
1 Like

• Build initialized

┌ Checking project files
│ info Checking metadata file (rush.yml)
│ info Checking AndroidManifest.xml file
└ done
┌ Compiling sources
│ info Picked 1 source file
└ done
┌ Processing the extension
│ info Linking extension assets and dependencies
│ info Optimizing the extension

│ You may need to add missing library jars or update their versions.
│ If your code works fine without the missing classes, you can suppress
│ the warnings with ‘-dontwarn’ options.
│ (ProGuard Manual: Troubleshooting | Guardsquare)

│ erro Please correct the above warnings first.
└ failed

option ‘-dontwarn’ in Rush - not supported?

You need to add them in the progaurd configuration file, to ignore all the errors you can just:

-dontwarn
2 Likes

if i make rush build -dontware or rush build -d i get:

PS C:\Rush\test1\test1> rush build -dontware (or PS C:\Rush\test1\test1> rush build -d)
__
_______ / /
/ / / / / / __
/ / / /
/ (
/ / / /
/
/ _
,
/
/
/ /
/

A new and improved way of building App Inventor 2 extensions.

Usage:
rush [command]

Global options:
-h, --help Prints usage information.

Available commands:
build Identifies and builds the extension project in current working directory.
create Scaffolds a new extension project in current working directory.
migrate Introspects and migrates the extension-template project in CWD to Rush.
upgrade Upgrades Rush and all it’s components to the latest available version.

in which file should I write “-dontwarn”?