Third-party libraries

Is it possible to import other third-party libraries to an extension?

the log does say that the package does not exist

Is there any way to “install” these kind of libraries?

1 Like

Sorry, I thought you were talking about Kodular Extension IDE… has been down for months.


Yes it is possible.
This is what you are looking for:

How shall I import it?
This doesn’t work:
@UsesLibraries(libraries = "Twilio.jar")

Sometimes you have to use @UsesLibraries annotation.
Most of the time this will work:

  • Copy jar file to <root>\appinventor-sources-master\appinventor\lib\JarFolder
    (Create JarFolder dir in case it does not exists)

  • Add this line to <root>\appinventor-sources-master\appinventor\components\build.xml:

    <copy toFile="${public.deps.dir}/NameOfJar.jar" file="${lib.dir}/JarFolder/NameOfJar.jar" />
1 Like

I am using the AppyBuilder IDE. Is it possible there?

No it is not possible there.
You can try this template:

It is very lightweight (just 25 mb) , fast and easy to use.

Did it with the Kio4 tutorial. Now I just import it normally (like this)?

You see I’m pushing to get that and the store fixed, but Congress won’t approve the bill :angry:

1 Like

Anyone familiar with this error?

C:\Users\ONT Studios\appinventor-sources\appinventor\build.xml:44: The following error occurred while executing this line:
C:\Users\ONT Studios\appinventor-sources\appinventor\components\build.xml:2: Unexpected element "{}copy" {}copy

My build.xml It’s exactly the same as on GitHub

I think you have posted wrong build.xml file.
You should post <root>\appinventor-sources-master\appinventor\components\build.xml but you have posted <root>\appinventor-sources-master\appinventor\build.xml

Right, the first error was the one.
(probably an error with the twilio import)

Try this one:

Yes, but it doesn’t have the Twilio library.

Are you sure that you have Twillo.jar file in JarFolder directory or you just have copy-pasted?

EDIT: Just noticed that it requires a .jar, not .java file.

You have to put jar file not java file.

Would just renaming the file extension work?

No,not at all.
Java and Jar are quite different.
Java is raw version while jar is compiled version.
Search jar file on google and put there.