Rush • A new and improved way of building extensions

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.

Got working :slightly_smiling_face:

1 Like

I am make a new extensions used libraries in extensions build successful but used in kodular and mit app crash