Tuesday, May 27, 2014

How to use external Java libraries in Android project?


In the event you're developing an application with Android as a target platform, and you need to include an external Java library (in the form of a .jar file) into your project, you just need to create a folder libs under the folder android (that Qt Creator should already have created if you're using an Android manifest) and copy the library there.

Just in case this is a sample folder structure for the Qt project:
your_Qt_project
    /android
        /libs
            /your_external_lib.jar

Please remember that the .jar file must be compiled for Android (in the form of Dalvik Executable) in order to avoid any issues.

No comments:

Post a Comment