Third-party libraries

May I please know what libraries you are using?

Can you try building it with the AI2 sources?

I am using Twilio.jar library compiled by Maven.

:point_up_2:

When I delete the project from the src folder, it still tries to compile it. Does ant remember it.

Yes, the compiled files (.class, .jar, .json, etc) of the extension(s) gets saved in the build directory the first time you build your extension and that’s why you get the extension even after deleting the source files. To get this resolved just run ant clean.

1 Like

Run ant clean, not ant clear

1 Like

my bad.

You should run the command in the template directory

3 Likes

Do you mean this?

2 Likes

How to work with Third-Party Libraries and Extension Template
Where should I place .jar file in Extension Template?

Place the jars in lib/deps/.

2 Likes

Is it enough?
I can’t find build.xml in Extension Template to edit it.

For the extension template , you don’t need to edit it , see also here:

You should add UsesLibraries annotation if you didn’t add it:

@UsesLibraries(libraries = "mylibraryname.jar")
1 Like

How to import the package?
Is it correct?

com.google.deps.example;

It says (IntelliJ Idea)

cannot resolve symbol ‘deps’

You should import the library to your IDE , too.However, adding it to your IDE, won’t affect the extension compiling, just it will prevent this error from the IDE.

@Mohamed_Tamer
How can i import library.
I have added jar file in my deps folder. Also added
@UsesLibraries(libraries = "library-name.jar")

Hello,
I’m using appybuilder code editor, so how to import the file in appybuilder code editor

It is not possible with Appybuilder Code Editor, I will suggest you to try the Appinventor Extension Template for better.

1 Like

Hello,
How to obtain the jar file from a library provided in github?