I. Referencing a JAR file
1. Copy and paste the jar file into the Libs directory of the app;
2. Right-click on the jar file and click "Add as Library" in the pop-up menu to add the jar file as a class library to the project;
3. Select the specified class library.
Note: If you do not perform step 2, 3, the jar file will not work and cannot be referenced using the import statement.
Ii. citation of so files
There are many ways to quote so files on the web, most of which are cumbersome, and find an easy way out of Kyle Thielk's blog.
1. Create a new directory named "Jnilibs" in the "Src/main" directory;
2. Copy and paste the so file into the "Jnilibs" directory.
Note: If the so file is not referenced, it may fail to load the class library when the program executes, with a debug prompt similar to the following:
JAVA.LANG.UNSATISFIEDLINKERROR:COULDN ' t load library xxxx from loader Dalvik.system.PathClassLoader
Getting Started with Android studio-referencing jars and so files