This is no longer required and IntelliJ IDEA (or any other JetBrains IDE) should be able to automatically index dependencies for every extension created using Rush 1.1.1 or higher.
This is basic … Did you really have tried writing simple programs in java ??
To import java package into a class , we need to use java import keyword which is used to access package and its classes into the java program. Use import to access built-in and user-defined packages into your java source file so that your class can refer to a class that is in another package by directly using its name.
Besides not having had much contact with Java, I haven’t programmed in Java for years.
But I program in several languages and it is just a matter of practicing.
I am not just waiting for an answer from you, I am analyzing several extension codes, mainly the AppInventor source code, and what I have found is this: @UsesLibraries(libraries = “json.jar”)
But this causes an error when compiling Rush.
Also, testing how an extension works is extremely annoying, so I’m turning to you, otherwise I wouldn’t be bothering you.
That annotation doesn’t exists in Rush, and that’s the reason behind errors. Instead, you need to declare any external dependency of your extension in rush.yml as stated previously by others.
As you mentioned you’re new to Java, I’d like to recommend you to use either IntelliJ IDEA or Android Studio as an IDE. Although VS Code is great for almost every other language and framework out there, it doesn’t quite play well with Java (and so with Rush).
Using either of the above mentioned IDEs will also help solve your confusion around import statements as they are able to auto-import required classes as you write your code.
Several programmers including me also used to ask different questions without realizing how actually java works… I’ve made my first extension and had published it when i even don’t know different small things of java … I didn’t know about Arrays , neither Methods , Interface or anythings… After realizing things , I then patiencly and slowly learned and still learning things…
importing any classes is the basic of java …in every programs, required imports are necessary …
Of course, so the developers had replied you with such answers:
Thanks a lot, I’ll download IntelliJ IDEA, VSCode is showing many errors in the code, which is also disturbing a lot. I had already understood that it was some difficulty to analyze the project and Rush doesn’t identify some annotations.