Hmmm, not seeing those issues here:
Yeah, maybe it's not working with this library...
Weird. I turned off desugar and it worked...Without "desugaring" it compiled what "ant" couldn't.
That warning appears in Java 9 and later when a class does something the JVM doesn't really like, so you may want to verify that the right version of Java is being activated when compiling.
Are you talking about this bug in rush? I just checked "java -version" and somehow java updated to version 11. Do I have to uninstall this version and install Java 8?
If you set JAVA_HOME
to point to the Java 8 installation it should be fine.
I have:
JAVA_HOME C:\Program Files\Java\jdk1.8.0_271
What does javac -version && java -version
display
Javac 11.0.9
Java 11.0.9
Do I have to remove this update and leave only java 1.8?
Yes you do
But apart from the java 11 which is probably used by the system, I have installed java 1.8 to which I have assigned the system constant JAVA_HOME C:\Program Files\Java\jdk1.8.0_271 mentioned above by Evan. So I think compile programs use fixed path stored in JAVA_HOME. The extensions compile correctly and work. The only problem is the jar which uses higher java, because extensions with older jar also compile correctly.
Ok, I had overwritten path to java and javac. I updated path to C:\Program Files\Java\jdk1.8.0_271\bin. Now getting java and javac version 1.8.0_271
Currently, the Java version that gets used depends on which version's javac
/ java
binary Rush first finds on the PATH
. Ideally, it should be the one defined in JAVA_HOME
, so this is a bug.
The issue with desugaring is that it requires specifically JDK 8 to work. So, like mentioned above, adding JDK 8 to your PATH
should resolve that.
I'm not quite sure what the issue might be here. You shouldn't see this error if mylibrary.jar
exists in the deps
directory. Make sure mylibrary.jar
is an actual file and not a symbolic link, and also that it isn't inside another directory in deps
.
The error occurred only when I enabled desugar. When I disabled desugar, there was no error and it found the library correctly. So all paths are correct. Unless the library itself is bad, in which case it wouldn't work without sugar either. I had the correct path to HOME_JAVA, to Java8. But the paths to java and javac led to java11. Maybe that was the problem.
Does rush support helpers? Based on the compile errors, I'm guessing not...
Yep, you're right. Rush doesn't yet support helpers.
We're waiting for your next update (Rush 2.0).
Can you give us any hope about the release date?
And the androidx library? Doesn't recognize androidx library import. Do i need to add the androidx library from the .jar file in rush?
Rush provides all the AndroidX libraries used by AI2 with identical versions. You can find the available AndroidX libraries here. If a library is unavailable, you need to add the required JARs as dependencies to your Rush project.
Also, it's worth noting that AI2 uses very initial versions of all these libraries. So, even if some library is available, it's very much possible that some imports may not work if they were added in a later version of the library. In such cases, you should add the JAR of a newer version of that library as a dependency, and (important) build with ProGuard optimization turned on. You can turn on optimization either by passing the -r
(--release
) flag while building or adding this in your rush.yml
:
build:
release:
optimize: true
I read somewhere that India blocks access to GitHub. You must use a vpn.