As mentioned in the post you linked, Rush needs Java Development Kit (JDK) 8 to compile your extensions. You've Java Runtime Environment (JRE) 8. Download and install JDK 8 and try again.
-- It says i already have installed JDK , Downloaded from
https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
You should run below commands in CMD and show the result:
java -version
javac - version
Also can you show the screenshot of Path
environment variable?
After running the commands ,
I've installed it from PowerShell and In wiki of rush , it is said :
With PowerShell, you don't need to update the PATH environment variable manually, the script does it for you automatically.
ScreenShot of Path
What happens if you uninstall the already installed JDK and reinstall it?
Well, I have faced the exact issues with the current version.
Sometimes I get it to work by -r flag.
I deleted Rush Files and JDK , then i reinstalled it ... And it is working charm now
This shouldn't really happen unless:
- You don't have JDK installed on your system.
- JDK's bin directory isn't on your
PATH
environment variable.
If that's not case, can you try reinstalling JDK 8 like @oseamiya did?
Ok Sir, thanks for support
What kind of Command Prompt are you using?
Because I see in your documentation your Command Prompt is different than mine
And in your documentation what does cd mean?
does that mean "command"
How can I update rush to the latest version if it is available?
The terminal that you're seeing the first post is VS Code's integrated terminal (w/ Git Bash).
cd
is a UNIX command used to change the current working directory in the terminal. You can find enough information about it on the internet.
The current latest version of Rush is v1.2.0. To know how to install it, read the below linked post.
@shreyash This is my first time using rush and I got an error that I don't know how to solve
Look at my command.
P.S: I didn't change anything in my project I just ran the command
PS E:\Rush Aix Builder> rush create SalmanTools
__
_______ _______/ /_
/ ___/ / / / ___/ __ \
/ / / /_/ (__ / / / /
/_/ \__,_/____/_/ /_/
? Organisation (package name) com.SalmanDev.SalmanTools
? Author Salman Developer
? Version name 1
? Language (Use arrow keys to navigate & press enter to select)
āŗ Java
Kotlin
ā¢ Getting things ready...
ā¢ Success! Generated a new AI2 extension project in: E:\Rush Aix Builder\salman-tools
Next up,
- cd into salman-tools/, and
- run rush build to compile your extension.
PS E:\Rush Aix Builder> cd salman-tools
PS E:\Rush Aix Builder\salman-tools> rush build
__
_______ _______/ /_
/ ___/ / / / ___/ __ \
/ / / /_/ (__ / / / /
/_/ \__,_/____/_/ /_/
ā¢ Build initialized
ā Checking project files
ā info Checking metadata file (rush.yml)
ā info Checking AndroidManifest.xml file
ā done
ā Compiling source files
ā info Picked 1 source file
ā done
ā Processing the extension
ā info Desugaring Java 8 language features
ā Error parsing command line: While parsing option --classpath_entry E:\Rush: E:\Rush is not a valid path: it does not exist.
ā Try --help.
ā failed
ā¢ Build failed [3s 786ms] []
Remove all the spaces from the directory: E:\Rush Aix Builder
and try again.
Now it works. Thanks sir
how to add lib in rush?
first add in deps folder and then add it in rush.iml or yml whatever
Okay i got it, sir
Would it be possible to add dependencies like in android studio? No jar file?
Yes, it is possible and is already on the roadmap.