Realm.io integration on Eclipse

I am trying to integrate the Realm.io database into a new project on Eclipse, however the following error occurs during compilation:

[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 solve this problem?


Edit: I tried unchecking "Power error when external banks contain embedded libraries" in Eclipse->Preferences->Android->Build , which did not change anything.

+5
source share
2 answers

This is a known issue with ADT. The Google team decided to ban, including native code, in Jar files because they notice that applications are published using native code for Windows and Mac.

I am working on a solution to a problem, and I have several select queries fixing the problem. Once they are merged into master and a new version is released (very soon), you will have to use the distribution package and move the contents of the eclipse folder to the libs folder.

You also need to enable annotation processing in Eclipse, but we will provide detailed instructions on how to do this.

Another problem with Eclipse is that it uses its own annotation processor (!!!), which returns elements not in the order specified in the source code, but in order by type. A workaround for this will also be released in 0.72.0

TL DR Stay tuned for the next (and imminent) release of Realm.

+6
source

Unzip de realm-0.71.0.jar and move the lib folders to the proyect libs folder

0
source

Source: https://habr.com/ru/post/1204379/


All Articles