Rush โ€ข A new and improved way of building extensions

Oops, I fixed it after rebuilding

1 Like
App Inventor is unable to compile this project.
The compiler error output was
____Preparing application icon
____Creating animation xml
____Creating style xml
____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: 2.13 seconds
____Compiling source files
(compiling appinventor/ai_anshmishra2166/mm/Screen1.yail to appinventor.ai_anshmishra2166.mm.Screen1)
ERROR: appinventor/ai_anshmishra2166/mm/Screen1.yail line 47: caught exception in inliner for #<procedure gnu.kawa.functions.AppendValues> - java.lang.RuntimeException: no such class: com.kab.myaix.MyAix
gnu.bytecode.ObjectType.getReflectClass([ObjectType.java:179](https://objecttype.java:179/))
gnu.bytecode.ClassType.getModifiers([ClassType.java:103](https://classtype.java:103/))
gnu.bytecode.ClassType.isInterface([ClassType.java:471](https://classtype.java:471/))
gnu.expr.InlineCalls.checkType([InlineCalls.java:56](https://inlinecalls.java:56/))
gnu.expr.InlineCalls.visit([InlineCalls.java:49](https://inlinecalls.java:49/))
gnu.expr.InlineCalls.visitSetExpValue([InlineCalls.java:363](https://inlinecalls.java:363/))
gnu.expr.InlineCalls.visitSetExpValue([InlineCalls.java:28](https://inlinecalls.java:28/))
gnu.expr.ExpVisitor.visitSetExp([ExpVisitor.java:114](https://expvisitor.java:114/))
gnu.expr.InlineCalls.visitSetExp([InlineCalls.java:369](https://inlinecalls.java:369/))
gnu.expr.InlineCalls.visitSetExp([InlineCalls.java:28](https://inlinecalls.java:28/))
gnu.expr.SetExp.visit([SetExp.java:406](https://setexp.java:406/))
gnu.expr.ExpVisitor.visit([ExpVisitor.java:55](https://expvisitor.java:55/))
gnu.expr.InlineCalls.visit([InlineCalls.java:46](https://inlinecalls.java:46/))
gnu.expr.InlineCalls.visitBeginExp([InlineCalls.java:272](https://inlinecalls.java:272/))
gnu.expr.InlineCalls.visitBeginExp([InlineCalls.java:28](https://inlinecalls.java:28/))
gnu.expr.BeginExp.visit([BeginExp.java:156](https://beginexp.java:156/))
gnu.expr.ExpVisitor.visit([ExpVisitor.java:51](https://expvisitor.java:51/))
gnu.expr.InlineCalls.visit([InlineCalls.java:46](https://inlinecalls.java:46/))
gnu.expr.InlineCalls.visit([InlineCalls.java:28](https://inlinecalls.java:28/))
gnu.expr.ExpVisitor.visitAndUpdate([ExpVisitor.java:161](https://expvisitor.java:161/))
gnu.expr.ExpVisitor.visitExps([ExpVisitor.java:175](https://expvisitor.java:175/))
gnu.expr.ApplyExp.visitArgs([ApplyExp.java:415](https://applyexp.java:415/))
gnu.kawa.functions.CompileMisc.validateApplyAppendValues([CompileMisc.java:139](https://compilemisc.java:139/))
sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke([DelegatingMethodAccessorImpl.java:43](https://delegatingmethodaccessorimpl.java:43/))
java.lang.reflect.Method.invoke([Method.java:498](https://method.java:498/))
gnu.expr.InlineCalls.maybeInline([InlineCalls.java:467](https://inlinecalls.java:467/))
gnu.expr.QuoteExp.validateApply([QuoteExp.java:150](https://quoteexp.java:150/))
gnu.expr.InlineCalls.visitApplyExp([InlineCalls.java:119](https://inlinecalls.java:119/))
gnu.expr.InlineCalls.visitApplyExp([InlineCalls.java:28](https://inlinecalls.java:28/))
gnu.expr.ApplyExp.visit([ApplyExp.java:410](https://applyexp.java:410/))
gnu.expr.ExpVisitor.visit([ExpVisitor.java:55](https://expvisitor.java:55/))
gnu.expr.InlineCalls.visit([InlineCalls.java:46](https://inlinecalls.java:46/))
gnu.expr.InlineCalls.visit([InlineCalls.java:28](https://inlinecalls.java:28/))
gnu.expr.LambdaExp.visitChildrenOnly([LambdaExp.java:1664](https://lambdaexp.java:1664/))
gnu.expr.LambdaExp.visitChildren([LambdaExp.java:1651](https://lambdaexp.java:1651/))
gnu.expr.InlineCalls.visitScopeExp([InlineCalls.java:279](https://inlinecalls.java:279/))
gnu.expr.InlineCalls.visitLambdaExp([InlineCalls.java:349](https://inlinecalls.java:349/))
gnu.expr.InlineCalls.visitLambdaExp([InlineCalls.java:28](https://inlinecalls.java:28/))
gnu.expr.ExpVisitor.visitModuleExp([ExpVisitor.java:103](https://expvisitor.java:103/))
gnu.expr.ModuleExp.visit([ModuleExp.java:482](https://moduleexp.java:482/))
gnu.expr.ExpVisitor.visit([ExpVisitor.java:51](https://expvisitor.java:51/))
gnu.expr.InlineCalls.visit([InlineCalls.java:46](https://inlinecalls.java:46/))
gnu.expr.InlineCalls.inlineCalls([InlineCalls.java:33](https://inlinecalls.java:33/))
gnu.expr.Compilation.walkModule([Compilation.java:994](https://compilation.java:994/))
gnu.expr.Compilation.process([Compilation.java:1965](https://compilation.java:1965/))
gnu.expr.ModuleInfo.loadByStages([ModuleInfo.java:330](https://moduleinfo.java:330/))
gnu.expr.ModuleInfo.loadByStages([ModuleInfo.java:315](https://moduleinfo.java:315/))
gnu.expr.ModuleInfo.loadByStages([ModuleInfo.java:315](https://moduleinfo.java:315/))
gnu.expr.ModuleInfo.loadByStages([ModuleInfo.java:315](https://moduleinfo.java:315/))
kawa.repl.compileFiles([repl.java:783](https://repl.java:783/))
kawa.repl.processArgs([repl.java:412](https://repl.java:412/))
kawa.repl.main([repl.java:827](https://repl.java:827/))
Kawa compile time: 3.229 seconds

AndroidRuntime.jar of my aix has no class files, I saw

1 Like

Most likely, it's because of incorrect ProGuard rules. Make sure you have the following two rules in your proguard-rules.pro file:

-keep public class your.extension.package** {
    public *;
 }

-keeppackagenames gnu.kawa**, gnu.expr**
3 Likes

Not able to download rush

1 Like

Why don't you use the powershell script for windows? It did work for me.
EDIT: I just tested it on a Linux machine, it works!

6 Likes

@shreyash most of time, aix I compile sends me error in building apk :
App Inventor is unable to compile this project.

The compiler error output was
________Preparing application icon
________Creating animation xml
________Creating style xml
________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.203 seconds
________Compiling source files
(compiling appinventor/ai_anshmishra2166/mmmmmmmm/Screen1.yail to appinventor.ai_anshmishra2166.mmmmmmmm.Screen1)

ERROR: appinventor/ai_anshmishra2166/mmmmmmmm/Screen1.yail line 36: caught exception in inliner for #<procedure gnu.kawa.functions.AppendValues> - java.lang.RuntimeException: no such class: com.kabby.w3words.W3Words

gnu.bytecode.ObjectType.getReflectClass(ObjectType.java:179)
gnu.bytecode.ClassType.getModifiers(ClassType.java:103)
gnu.bytecode.ClassType.isInterface(ClassType.java:471)
gnu.expr.InlineCalls.checkType(InlineCalls.java:56)
gnu.expr.InlineCalls.visit(InlineCalls.java:49)
gnu.expr.InlineCalls.visitSetExpValue(InlineCalls.java:363)
gnu.expr.InlineCalls.visitSetExpValue(InlineCalls.java:28)
gnu.expr.ExpVisitor.visitSetExp(ExpVisitor.java:114)
gnu.expr.InlineCalls.visitSetExp(InlineCalls.java:369)
gnu.expr.InlineCalls.visitSetExp(InlineCalls.java:28)
gnu.expr.SetExp.visit(SetExp.java:406)
gnu.expr.ExpVisitor.visit(ExpVisitor.java:55)
gnu.expr.InlineCalls.visit(InlineCalls.java:46)
gnu.expr.InlineCalls.visitBeginExp(InlineCalls.java:272)
gnu.expr.InlineCalls.visitBeginExp(InlineCalls.java:28)
gnu.expr.BeginExp.visit(BeginExp.java:156)
gnu.expr.ExpVisitor.visit(ExpVisitor.java:51)
gnu.expr.InlineCalls.visit(InlineCalls.java:46)
gnu.expr.InlineCalls.visit(InlineCalls.java:28)
gnu.expr.ExpVisitor.visitAndUpdate(ExpVisitor.java:161)
gnu.expr.ExpVisitor.visitExps(ExpVisitor.java:175)
gnu.expr.ApplyExp.visitArgs(ApplyExp.java:415)
gnu.kawa.functions.CompileMisc.validateApplyAppendValues(CompileMisc.java:139)
sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
gnu.expr.InlineCalls.maybeInline(InlineCalls.java:467)
gnu.expr.QuoteExp.validateApply(QuoteExp.java:150)
gnu.expr.InlineCalls.visitApplyExp(InlineCalls.java:119)
gnu.expr.InlineCalls.visitApplyExp(InlineCalls.java:28)
gnu.expr.ApplyExp.visit(ApplyExp.java:410)
gnu.expr.ExpVisitor.visit(ExpVisitor.java:55)
gnu.expr.InlineCalls.visit(InlineCalls.java:46)
gnu.expr.InlineCalls.visit(InlineCalls.java:28)
gnu.expr.LambdaExp.visitChildrenOnly(LambdaExp.java:1664)
gnu.expr.LambdaExp.visitChildren(LambdaExp.java:1651)
gnu.expr.InlineCalls.visitScopeExp(InlineCalls.java:279)
gnu.expr.InlineCalls.visitLambdaExp(InlineCalls.java:349)
gnu.expr.InlineCalls.visitLambdaExp(InlineCalls.java:28)
gnu.expr.ExpVisitor.visitModuleExp(ExpVisitor.java:103)
gnu.expr.ModuleExp.visit(ModuleExp.java:482)
gnu.expr.ExpVisitor.visit(ExpVisitor.java:51)
gnu.expr.InlineCalls.visit(InlineCalls.java:46)
gnu.expr.InlineCalls.inlineCalls(InlineCalls.java:33)
gnu.expr.Compilation.walkModule(Compilation.java:994)
gnu.expr.Compilation.process(Compilation.java:1965)
gnu.expr.ModuleInfo.loadByStages(ModuleInfo.java:330)
gnu.expr.ModuleInfo.loadByStages(ModuleInfo.java:315)
gnu.expr.ModuleInfo.loadByStages(ModuleInfo.java:315)
gnu.expr.ModuleInfo.loadByStages(ModuleInfo.java:315)
kawa.repl.compileFiles(repl.java:783)
kawa.repl.processArgs(repl.java:412)
kawa.repl.main(repl.java:827)
Kawa compile time: 2.203 seconds

I dont know wy but androidruntime.jar of my aix is blank, I didnt modify proguard rules, I just wrote code and compiled

1 Like

Have you tried this:

1 Like

I didnt even modify proguard-rules.pro

# Add any ProGuard configurations specific to this
# extension here.

-keep public class com.kabby.w3words.W3Words {
    public *;
 }
-keeppackagenames gnu.kawa**, gnu.expr**

-optimizationpasses 4
-allowaccessmodification
-mergeinterfacesaggressively

-repackageclasses 'com/kabby/w3words/repack'
-flattenpackagehierarchy
-dontpreverify
1 Like

Make sure the bold text :point_up_2: matches with your extension's fully qualified class name. If the issue persists, try building your extension with optimization turned off.

1 Like

@shreyash may I know the latest version of Rush I am confused :sweat_smile:
and can you link to that release post

1 Like

You can always find the latest release here on GitHub:

1 Like

It does :face_with_thermometer:

1 Like

@shreyash Please help, I can't upgrade my Rush.
My Rush Version = 1.2.1

Problems when run rush upgrade =

PS C:\Users\Salman> rush upgrade
                      __
     _______  _______/ /_
    / ___/ / / / ___/ __ \
   / /  / /_/ (__  / / / /
  /_/   \__,_/____/_/ /_/

info Fetching data...
Unhandled exception:
GitHub Error: Bad credentials
#0      RepositoriesService.getContents.<anonymous closure> (package:github/src/common/repos_service.dart:573)
#1      GitHub.requestJson (package:github/src/common/github.dart:280)
<asynchronous suspension>
#2      UpgradeUtils.fetchContents (package:rush_cli/commands/upgrade_command/helpers/upgrade_utils.dart:18)
<asynchronous suspension>
#3      UpgradeCommand.run (package:rush_cli/commands/upgrade_command/upgrade_command.dart:36)
<asynchronous suspension>
#4      CommandRunner.runCommand (package:args/command_runner.dart:196)
<asynchronous suspension>
PS C:\Users\Salman>

There were some issues with the upgrade command which were fixed in the later releases. You'll have to reinstall Rush this time to upgrade it.

1 Like

I have the same message, but I am just 2 or 3 updates behind...

1 Like

Is there direct download link
I do not want to download with shell or any power shell

2 Likes

Yeah, it could be easy with a .exe file

2 Likes

No Rush doesn't provide a separate installer for Windows. You need to run the PowerShell script or the bash script to install the Binaries.

3 Likes

Why rush do not building my extension

C:\Users\Afroz Ahmad>cd C:\Users\Afroz Ahmad\botttom-navigation

C:\Users\Afroz Ahmad\botttom-navigation>rush build
                      __
     _______  _______/ /_
    / ___/ / / / ___/ __ \
   / /  / /_/ (__  / / / /
  /_/   \__,_/____/_/ /_/

โ€ข Build initialized

โ”Œ Checking project files
โ”‚ info Checking metadata file (rush.yml)
โ”‚ info Checking AndroidManifest.xml file
โ”” done
โ”Œ Compiling sources
โ”‚ info Picked 1 source file
โ”‚      javac: invalid flag: Ahmad\AppData\Roaming\rush\workspaces\com.faraz.bottomnavigation.botttomnavigation\classes
โ”‚      Usage: javac <options> <source files>
โ”‚      use -help for a list of possible options
โ”” failed

โ€ข Build failed [1s 366ms] []
2 Likes

You have an invalid flag!

Possibly, again, looks like you have a space in your file path......\Afroz Ahmad\

2 Likes