Rush • A new and improved way of building extensions

Installed on Linux, I am getting a similar output error as @luv.ak.tech when running build for the first time (I have tried reinstalling rush):

• Build initialized

┌ Checking project files
│ 
│  OK Metadata file (rush.yml) found
│ 
│  OK AndroidManifest.xml file found
└ Done
┌ Compiling Java files
└ Done
Unhandled exception:
NoSuchMethodError: The getter 'stderr' was called on null.
Receiver: null
Tried calling: stderr
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:54)
#1      Javac.compile.<anonymous closure> (package:rush_cli/java/javac.dart:59)
#2      _RootZone.runUnaryGuarded (dart:async/zone.dart:1546)
#3      _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:362)
#4      _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:378)
#5      _BufferingStreamSubscription._addError (dart:async/stream_impl.dart:280)
#6      _SyncBroadcastStreamController._sendError.<anonymous closure> (dart:async/broadcast_stream_controller.dart:393)
#7      _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:323)
#8      _SyncBroadcastStreamController._sendError (dart:async/broadcast_stream_controller.dart:392)
#9      _AsBroadcastStreamController.addError (dart:async/broadcast_stream_controller.dart:487)
#10     _RootZone.runBinaryGuarded (dart:async/zone.dart:1558)
#11     _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:360)
#12     _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:378)
#13     _BufferingStreamSubscription._addError (dart:async/stream_impl.dart:280)
#14     _SyncStreamControllerDispatch._sendError (dart:async/stream_controller.dart:737)
#15     _StreamController._addError (dart:async/stream_controller.dart:615)
#16     new Stream.fromFuture.<anonymous closure> (dart:async/stream.dart:166)
#17     _RootZone.runBinary (dart:async/zone.dart:1617)
#18     _FutureListener.handleError (dart:async/future_impl.dart:166)
#19     Future._propagateToListeners.handleError (dart:async/future_impl.dart:716)
#20     Future._propagateToListeners (dart:async/future_impl.dart:737)
#21     Future._completeError (dart:async/future_impl.dart:547)
#22     Future._chainForeignFuture.<anonymous closure> (dart:async/future_impl.dart:492)
#23     _microtaskLoop (dart:async/schedule_microtask.dart:40)
#24     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49)
#25     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:120)
#26     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:185)
1 Like

hey @TimAi2 so do i need to reinstall rush and try again?

I simply indicated that I tried a reinstall in case something was amiss, but to no avail, i get the same error output as you do.

1 Like

@TimAi2

I got it working when I updated rush to another (not 1.1.0) version which Shreyash provided me and it worked well:

ok let me try changing the exe file

then it shows the jdk problem again

The EXE I provided you is already being used by other users as well. I updated the executables for all platforms yesterday itself.

It won’t buy you anything. You already have the same executable on your PC.

2 Likes

then we have to use appinventor sources?

Thanks @Shreyash , we got it working :smiley:

On Xubuntu 20.04

Install as follows:

sudo apt install default-jre              
sudo apt install openjdk-8-jre
sudo apt install openjdk-8-jre-headless   
sudo apt install openjdk-8-jdk
sudo apt install openjdk-8-jdk-headless

Java version 8 (JDK &JRE) is required for successful compilation of apks (well certainly it is on App Inventor)

If you have any other java versions on board (11,13,14) then you will need to uninstall them.

Then set JAVA_HOME

Use output from

$:which java
/usr/bin/java

to enter into .bash_profile

$:nano ~/.bash_profile

add and save

export JAVA_HOME=/usr/bin/java

set

$:source ~/.bash_profile

test

$:echo $JAVA_HOME
/usr/bin/java
~/Extn/test1$ rush build -r

Check out folder for .aix file

4 Likes

Only sudo apt install openjdk-8-jdk would be enough. You don’t actually need all those versions of JRE.

2 Likes

any help in windows

For this yes. :slight_smile:

If java is not installed and you type

java -version

Xubuntu tells you to install all of them. Doesn’t do any harm, and may help with other java things, yet to come :wink: But only install version 8. And remove other versions >8.

2 Likes

I’m still investigating the issue on Windows. Will get back to you as soon as I’ve a solution. Until then you can revert back to Rush 1.0.1 if you want to.

2 Likes

I also experienced the “JDK not found” problem when upgrading from the previously working OK version of Rush.
Added the following to the PATH system variable…
%JAVA_HOME%\bin;
%JAVA_HOME%\jre\bin
…and all now working fine.
Hope this helps.
Thanks Shreyash for this amazing software.
Jim

2 Likes

thanks @hartgps it worked

I’ve gotten a successful build with Rush 1.1.0.

Is this a normal error and the same with AppInventor sources or Extension template?

│    warning: The following options were not recognized by any processor: '[output, org, root, version, extName]'
│
│ ERR src\dev\kumaraswamy\detzcodec\DetzCodec.java:33: error: cannot access AppCompatCallback
│        form.$context().runOnUiThread(new Runnable() {
│            ^
│      class file for androidx.appcompat.app.AppCompatCallback not found
│
│ Total error(s): 1
└ Failed

Without enough context, it’s quite hard to guess what’s wrong.

Here is the full logs:


• Build successful

C:\Users\user\Desktop\Codes\DetzCodec\detz-codec>rush build
                      __
     _______  _______/ /_
    / ___/ / / / ___/ __ \
   / /  / /_/ (__  / / / /
  /_/   \__,_/____/_/ /_/

• Build initialized

┌ Checking project files
│
│  OK Metadata file (rush.yml) found
│
│  OK AndroidManifest.xml file found
└ Done
┌ Compiling Java files
│    warning: The following options were not recognized by any processor: '[output, org, root, version, extName]'
│
│ ERR src\dev\kumaraswamy\detzcodec\DetzCodec.java:37: error: cannot access AppCompatCallback
│        form.$context().runOnUiThread(new Runnable() {
│            ^
│      class file for androidx.appcompat.app.AppCompatCallback not found
│
│ Total error(s): 1
└ Failed

• Build failed

C:\Users\user\Desktop\Codes\DetzCodec\detz-codec>

And here is the code:

@SimpleEvent(description = "Event raised when encoding is done")
  public void Encoded(final int size) {
    form.$context().runOnUiThread(new Runnable() {
      @Override
      public void run() {
        EventDispatcher.dispatchEvent(DetzCodec.this, "Encoded", size);
      }
    });
  }

Sorry for not including the info at first.

Looks like some libraries weren’t downloaded earlier (in this case, the appcompat.jar). Please re-run the Rush installer. And once the installation is done, delete the .rush/dev-deps directory and then re-build the project.