Some problems about @UsesLibraries(libraries = "javaximageio.jar") in extension

After I write @UsesLibraries(libraries = "javaximageio.jar") into the corresponding extension source file and compile it,the appinventor/components/build/externalcomponents-class folder contain javaximageio.jar package.

But it is not included in the .aix file, because the size of the .aix file is the same as not using @UsesLibraries(libraries = "javaximageio.jar").

Import .aix file and use it in the app inventor 2 project. An error will be reported after running: Java lang.NoClassDefFoundError: Failed resolution of: Ljavax/imageio/ImageIO;

how to solve it?

You need to add entery (path) for that in build.xml file present in component/ directory. Need to add extra jar file in lib folder

For example you can see the Twitter component source code.

In this document you will find the guide to add external lib in extension.