I would like to import a non-Android Java library to an Android project.
Based on my research, there seem to be two main options:
Add the source code of the Java library as a separate module. However, the source code cannot simply be imported (e.g. added as a subrepo) since the Android package names would need to be added to each file.
Add a JAR file of the Java library. I have been following the instructions available here, and the project builds successfully, though I am still unable to import classes from the library. I suspect this may be because the project is a standalone Java library rather than an Android library.
Any advice on how to add the library (either as a JAR or as a copy of the existing library) would be greatly appreciated. Thanks.