I'm attempting to integrate the Realm.io database into a fresh project on Eclipse however upon compilation the following error is thrown:
[2014-10-09 16:21:48 - DatabaseBenchmark] The library 'realm-0.71.0.jar' contains native libraries that will not run on the device.
[2014-10-09 16:21:48 - DatabaseBenchmark] Additionally some of those libraries will interfer with the installation of the application because of their location in lib/
[2014-10-09 16:21:48 - DatabaseBenchmark] lib/ is reserved for NDK libraries.
[2014-10-09 16:21:48 - DatabaseBenchmark] The following libraries were found:
[2014-10-09 16:21:48 - DatabaseBenchmark] - lib/armeabi/libtightdb-jni.so
[2014-10-09 16:21:48 - DatabaseBenchmark] - lib/armeabi-v7a/libtightdb-jni.so
[2014-10-09 16:21:48 - DatabaseBenchmark] - lib/mips/libtightdb-jni.so
[2014-10-09 16:21:48 - DatabaseBenchmark] - lib/x86/libtightdb-jni.so
Any thoughts on how to resolve this issue?
Edit:
I've tried unchecking "Force error when external jars contain native libraries" in Eclipse->Preferences->Android->Build
which did not change anything.
That's a known problem with ADT. The Google team decided to disallow including native code in Jar files because they notices apps being published containing native code for Windows and Mac.
I'm working on solving the problem and I have a couple of pull requests fixing the issue. Once they will be merged in master and a new release is done (very soon) you will have to use the distribution package and move the contents of the eclipse folder into the libs folder.
You will also have to enable annotation processing in Eclipse, but we will provide detailed instructions on how to do that.
Another problem with Eclipse is that it uses its own annotation processor processor (!!!) which returns elements not in the order provided in the source code, but ordered by type. A workaround for that will also be released in 0.72.0
TL;DR Stay tuned for the next (and imminent) release of Realm.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With