Yes
You have JRE; you need to install JDK (version 8).
Hello all!
Recently I conducted a survey, which very few participated in. Previously I was trying to convince @Shreyash to include the Android R Prebuilt Platform SDK in Rush, which would allow extension developers to develop extensions for Android R. Currently if you type Build.VERSION_CODES.
into IntelliJIDEA (or an IDE with “code completion”), Build.VERSION_CODES.R
will not appear. That is because Rush is using the The Android Q Prebuilt Platform SDK, which App Inventor uses since they target Android Q. @Shreyash will not be including the Android R Prebuilt Platform SDK in Rush, but instead stick to App Inventors cycle (which is slow).
Although it’s at his discretion to include the Android R Platform SDK or not, you could of course upgrade it locally by yourself. There are two ways to do this.
- Globally
- Per-project
To make sure you understand the process, this is only meant for IDEs which have “code completion” for Java (and when building with Rush, since it checks methods against dependencies), such as IntellIJIDEA. The “dev-deps” directory is meant for development dependencies and aren’t included in your final extension, they are simply there so that your IDE can use “code completion,” which makes it easier for you to code!
Globally
This is a good guide if you want to replace the “android.jar” automatically for future created projects. If you have previously created projects, follow the “Per project” guide.
- Locate the folder that Rush has created; “C:\Users\user\AppData\Roaming\rush”
- This was created with v1.1.0. You will have to find the directory which you unzipped Rush into if you still use anything below v1.1.0.
- Now go into “dev-deps”
- This is where development dependencies are located, they aren’t included with your extension.
- Download the Prebuilt Platform SDK from one of the following links
-
Android R Prebuilt Platform SDK from MEGA.NZ
- The Android R Prebuilt Platform SDK is from the official release of Android R.
-
Android S Prebuilt Platform SDK from MEGA.NZ
- The Android S Prebuilt Platform SDK is from the Android S Beta 1. I will modify the link when the candidate release for Android S is released.
-
Android R Prebuilt Platform SDK from MEGA.NZ
- Now that you’ve downloaded one of the Prebuilt Platform SDKs, you can rename it to “android.jar”
- Drag and drop the new “android.jar” in place of the old one
- Create a new project with Rush by running “rush create ProjectName” in a command prompt, and you’re set to go!
- This change won’t take affect on previously created projects. Follow the “Per project” guide if you want to upgrade a previously created project.
Per project
Steps between this and the “Global” guide are similar, however, directories and some steps are different.
- Locate the folder of your project; “C:\Users\user\Desktop\ProjectName”
- Now go into “dev-deps”
- This is where development dependencies are located, they aren’t included with your extension.
- Download the Prebuilt Platform SDK from one of the following links
-
Android R Prebuilt Platform SDK from MEGA.NZ
- The Android R Prebuilt Platform SDK is from the official release of Android R.
-
Android S Prebuilt Platform SDK from MEGA.NZ
- The Android S Prebuilt Platform SDK is from the Android S Beta 1. I will modify the link when the candidate release for Android S is released.
-
Android R Prebuilt Platform SDK from MEGA.NZ
- Now that you’ve downloaded one of the Prebuilt Platform SDKs, you can rename it to “android.jar”
- Drag and drop the new “android.jar” in place of the old one
- If you’re asked if you want to overwrite the old “android.jar,” select “Yes”
- Select “File” then “Reload all from Disk” from IntelliJIDEA
- If you don’t use IntelliJIDEA, restart your IDE for changes to take affect. This might automatically happen though.
- Sometimes IntelliJIDEA will automatically do this, however, we want to make sure it actually happens!
- Start coding and build your extension with Rush by running “rush build” in a command prompt, and you’re set to go!
Downgrade to JDK 8; compiling against versions higher than that isn’t currently supported.
Try this version jdk - 1.8.0
https://www.oracle.com/in/java/technologies/javase/javase8u211-later-archive-downloads.html#license-lightbox
first remove jdk bin path if there is any
then install the jdk from above link
install it and add bin path to system variable
Getting error
Processing the extension
Unhandled exception:
FileSystemException: Cannot copy file to ‘C:\Users\varsha\AppData\Roaming\rush\workspaces\varsha.com.n.h\raw\x\varsha.com.n.h\components.json’, path = ‘C:\Users\varsha\AppData\Roaming\rush\workspaces\varsha.com.n.h\classes\simple_components.json’ (OS Error: The system cannot find the file specified.
, errno = 2)
#0 _File.throwIfError (dart:io/file_impl.dart:635)
#1 _File.copySync (dart:io/file_impl.dart:340)
#2 Generator._generateRawFiles (package:rush_cli/generator/generator.dart:45)
#3 Generator.generate (package:rush_cli/generator/generator.dart:28)
#4 BuildCommand._process (package:rush_cli/commands/build_command/build_command.dart:261)
#5 BuildCommand._compile. (package:rush_cli/commands/build_command/build_command.dart:231)
varsha@varsha-PC MINGW64 ~/Documents/RUSHAIX/rush/bin/h
Is this is the default starter extension template that you’re trying to compile? If it’s not, then it’s likely that you haven’t declared any block annotation in the extension. This is a known bug where, if there’s no block annotation declared, Rush crashes, causing the build to fail.
Edit: I’ve fixed this issue for the upcoming release.
Mean??
May you show post the code here. if it is a error.
i am using Custom Encryption for verification in extension
but in old version encrypted string was working fine
but when i upgraded to latest version of rush
it got the error as shown above
There is a limit of 65535 bytes on the length of string constants in Java. This also applies to method and field names. From what I can see in your screenshot, the length of your string, most probably, exceeds that limit, and hence the error.
I’m not really convinced with this. Rush doesn’t interfere with or try to modify the behavior of the Java compiler in any way. It’s most likely that the size of your string constant might have increased without you noticing it given that you’re using some custom encryption techniques.
i’ll share about this later
I’ve downgraded to v.1.0.1 from latest version
but i got this error when building extension
Is there any way to completely uninstall Rush so that i can reinstall the old one perfectly
also as i said in new version long length string is not working fine…
I’m posting this from my pc which have old version of rush
and in that it worked fine
You never mentioned what version of Rush you’re using, so, it was natural for me to assume it to be the v1.1.1. Anyways, back during v1.0.1, unlike today, Rush used Apache Ant for compiling your extension’s Java sources. And maybe, that’s why your extension compiled just fine w/o any errors. I’m not really sure how Ant deals with your code while compiling it, but if what you’re saying is true, chances are it has some sort of mechanism (maybe?) to handle such scenarios.
yes may be! so if it can be solved its humble request to solve it asap!
I can share the piece of code with you which i’m trying to compile if you want
Also it there any way to completely uninstall rush v1.1.2
so that i can reinstall v1.0.1
- Type %appdata% into your File Explorers “address bar”
- Hit enter ()
- Delete the Rush directory
- Run the v1.0.1 installer instead
- Select the location you previously selected to install Rush in
- It will overwrite the old rush.exe.
already did this but got error shown in image shared above
i’m sorry i’ve deleted temp and rush folder then updated
let me try your method