Please help! error creating extension? (Code suggest on VS Code)

Hello, I’m trying to learn how to create extensions here for Kodular, but I’m not succeeding. I tried to replicate everything I saw in this YouTuber’s playlist https://www.youtube.com/playlist?list=PL4yqDBLrt3wucpLoFuXCtDlQeiuQxb0is but I’m not able to create the extension because it always gives an error.

Here is the image of the error, and yes, I’m using Vscode as a code editor.

Please, if anyone can help!

Ig you don’t have java installed Please install jdk 8 from azul or any other as per your wish

Well, I’ve already installed Java as I saw in the video, but this error still appears, so I don’t know what to do anymore.

Do you think JDK 8 would be better? Sorry for the question, I’m a beginner in these things.

1 Like

Yes JDK 8 or 11 is used to compile extensions

Double-check the code you’ve written against the examples. Make sure all your imports are correct and that there are no typos. Also, verify that your environment is set up properly in VSCode. Sometimes, missing dependencies can cause errors.

1.Your main mistake is that you are trying to build the extension in Visual Studio Code, and not in Rush. The video on your link specifically indicates that the extension is going to Rush, and not something else. not in Visual or Android Studio
2. The errors that you are experiencing indicate that libraries are needed for compilation that the compiler has never heard of at all. for example, com.google.appinventor.components.annotations. * and others created by Appinventor. Therefore, if you continue in this spirit, you should download or create these libraries from the provided APPInvertor resources. and get libraries at least CommonConstants.jar, AnnotationProcessors.jar,AndroidRuntime.jar.
This is a completely different topic. it is quite extensive. but it will allow you to create an extension directly on Android Studio with a few caveats… but this is a difficult path for a samurai :slight_smile: so far, I’ve downloaded, compiled libraries and exposed dependencies… it took a lot of time, and it’s actually much easier and faster to use other compilers. unless on the same Android Studio you can see the result immediately and not upload the extension to the editor.
And finally, about your link to the course, these are some real cuts. before creating extensions on Rush, the author of the course at least explained what it consists of and how to configure it)

if you use Rash, then 8 version java is more than enough. Rash compilers understand the mnemonics of Java 7 operators, not Java 8, which is considered obsolete in principle.
If you want to go further and create a library for use in other compilers, then you will need 17 java (although the APPInvertor documentation mentions that you need 11 java. but in practice, some classes require a minimum of 17. the paradox :slight_smile:

Hi, how are you? So, I’m new to the extension creation community. I still don’t know the correct or right way to create an extension, so I went looking for a tutorial on YouTube on how to develop an extension for Kodular and then I found this playlist: https://www.youtube.com/playlist?list=PL4yqDBLrt3wucpLoFuXCtDlQeiuQxb0is, but I’m having problems, because you can use VS Code to edit Rush extensions, but I really don’t know anything about it, lol, and that’s why I’m here. If you can tell me exactly where I went wrong, I’ll help you out, thanks.

Here’s what I’ve done so far.

  1. Installed JDk

Capture 2

  1. Followed the procedure to create an environment variable

3 Installed Rush

Capture 5

  1. Created the directory where the extension would be

Capture 8

  1. I created the test extension

  1. But I always saw this error (I installed VS Code as the code editor for this application)


I even downloaded Git to see if it helps, but I don’t know what to do with this and how to solve the error

Capture4

Please help me! If possible, because I don’t know if I did something wrong or if something is missing to complete the system.

Your Rush installation appears to be functioning correctly. However, you’re encountering code suggestion and auto-completion issues. Currently, Rush doesn’t offer VS Code support; therefore, you’ll need to manually configure VS Code to enable code suggestions within your project. Alternatively, you might consider using FAST, which provides code suggestion functionality for VS Code.

I’ll try to explain it to you.
judging by the screenshots, you have successfully installed rush. and everything is ready to be used. and judging by the screenshots, you had java8, which is quite acceptable, but later you should install java11. but not now for sure :slight_smile:
in fact, you have everything ready to write an extension.
all that remains is to ask to create an extension code) for testing, it is very easy to do this. in the future, you will understand everything - the whole algorithm and the principle of operation.
Your first mistake that led you on the wrong track was using VS Studio. :face_with_peeking_eye:

the fact is that it is a powerful editor, but in your case it is redundant. Why? yes, because it is automated. in your example, he just screams, “Give me these libraries. This is the first time I’ve seen this.” And he’s right :slight_smile: these are specialized libraries that the APP Invertor and all the others run on. as a result, he suggests downloading and installing something. you can go this way, but it will be difficult, it will take a long time, and it’s not certain that everything will work out.
In the screenshot, this is exactly what your editor requires. so it’s better to abandon automation :slight_smile: in fact, the code can be written even in a notebook. but it’s inconvenient - the syntax is not highlighted. personally, I use a regular Notepad++. it is enough to set syntax highlighting in it, and this is enough to edit the code.
after you have created the code, it is enough for you to save it. the code itself is located in the folder scr (example test.java). then, through the command console, as in the first screenshots, run the build. from under the directory where to be located rash.xml .
with the rush build command, you get the result in the out folder. if there are errors, they will be indicated with the line number… in general, it’s not difficult. the file itself rush.xml located in the project folder. You can also edit it with a notepad. there are comments on what’s what inside :slight_smile:

For the first time, this will be enough for you. but if you have to work with private or other unique libraries later, then, of course, it’s better to use FAST. there are more settings and features. it is very similar to rush. but it is definitely not recommended for you at this stage. first, master rush.

Based on the screenshot code, I assume that you are not familiar with java even in general terms. of course, in order to write any extension, you need to be at least a little familiar with the fundamental knowledge of the language. otherwise, there will be a complete misunderstanding.