I am using Sqlite4Java in my LibGDX project, and I am not using maven’s directory so I downloaded the library into my projects. If I add the natives manually from Eclipse it works. but everytime I refresh graddle, the natives gets removed. So I have to add them manually again. I thought it would be more convenient to add them to the gradle.build file, but I cannot manage to make it work.
The source code is added this way to the core project, this does not create any problems:
compile files('libs/sqlite4java.jar')
Then I tried to add the native libraries to the desktop project, none of the methods below works. Here is the example for a single native file:
natives files('libs/sqlite4java-linux-amd64.so')
natives "com.almworks.sqlite4java:libsqlite4java-linux-amd64:1.0.392"
In both cases, gradle fail to build. I tried:
compile files('libs/libsqlite4java-linux-amd64.so')
In that case, gradle build, but the execution fails with
cannot load library: java.lang.UnsatisfiedLinkError: no sqlite4java-linux-amd64 in java.library.path
If you have any clue or documentation to make it work, let me know.