Rush • A new and improved way of building extensions

Your using an invalid type as your blocks return or parameter type. As of Rush v1.2.5, you can only use the following types as parameters or return types:

  1. Strings
  2. Number types like int, float, double, etc.
  3. java.util.Calendar
  4. boolean
  5. Classes of all the available AI2 components and other runtime classes, like Button, AndroidViewComponent, etc.
  6. Some other AI2 types like YailList, YailObject and YailDictionary.
  7. java.lang.Object
1 Like

Shreyash, I’m trying to install Rush from curl, this does not work.

kumaraswamy@watermelon:~$ curl https://raw.githubusercontent.com/shreyashsaitwal/rush-cli/main/scripts/install/install.sh -fsSL | sh
curl: (35) error:140943E8:SSL routines:ssl3_read_bytes:reason(1000)

It seems that the install script on github is no more.

It is probably something on myside, something isn’t right.

image

I’m unable to use Kotlin in Rush, also tried creating a new Kotlin project, results are the same. Builds fine with default, Java.

I also followed the Wiki:

build:
  release:
    # Optimizes the extension on every release build.
    optimize: true

  kotlin:
    enable: true

Hello. Please can you tell me where the XML view of the activity layout is added. In Android Studio it is found as activity_main.xml.

This is not possible with Rush currently; you will have to add the Views programmatically, i.e. with Java code.

2 Likes

Java version

D:\Rush\web-x>java -version
java version "19" 2022-09-20
Java(TM) SE Runtime Environment (build 19+36-2238)
Java HotSpot(TM) 64-Bit Server VM (build 19+36-2238, mixed mode, sharing)

Error

┌ 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
│ info Generating DEX bytecode
│      Compilation failed with an internal error.
│      java.lang.IllegalArgumentException: Unsupported class file major version 63
│       at com.android.tools.r8.A.a.a.f.<init>(:10)
│       at com.android.tools.r8.A.a.a.f.<init>(:2)
│       at com.android.tools.r8.A.a.a.f.<init>(:1)
│       at com.android.tools.r8.A.a.a.f.<init>(:107)
│       at com.android.tools.r8.graph.x0.a(:24)
│       at com.android.tools.r8.dex.a$a.a(:12)
│       at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1456)
│       at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
│       at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1311)
│       at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1840)
│       at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1806)
│       at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
└ failed

• Build failed [4s 122ms] []

Try using JDK 8 maybe?

2 Likes

I’m wondering if we’ll get a March 13th release.

Probably not.

We’re waiting since long time for your hard work. Can you give us any hope about Rush 2.0 update?

5 Likes

I am facing this issue …I am a beginner for rush so can you tell me how to solve this issue??

You don’t seem to have JDK installed. Install it and try again.

2 Likes

Thanks It’s work :relieved::grinning: … Can you please tell me How can I compile 2 or more Java together and how can I import string value one from another java ???

How can I use Asset image ( new.png ) in function??

Mention assets location in the yaml file

Please tell me all steps one by one

You can put any number of Java files inside the src folder (under whatever package) and they will be compiled with your extension.


You need to specify the required asset(s) in rush.yml like this:

assets:
  other:
    - new.png

You can then load this in your extension using the openAssetForExtension(...) method available in Form.

1 Like