couldn't find "librealm-jni.so"
After the last android updates i found this error in every project i use realm
this is the stacktrace:
08-25 16:03:40.457 16017-16017/it.fortech.fortechmobilepayment E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: it.fortech.fortechmobilepayment, PID: 16017
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/it.fortech.fortechmobilepayment-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "librealm-jni.so"
at java.lang.Runtime.loadLibrary(Runtime.java:366)
at java.lang.System.loadLibrary(System.java:988)
at io.realm.internal.RealmCore.loadLibrary(RealmCore.java:114)
at io.realm.internal.SharedGroup.
Tested on Nexus 5 device Android Studio 1.3 OS X 10.10.5
@DenisBronx Can you get into the /data/data/<package_name>/lib to see if the librealm-jni.so is there?
yes, and i get the same error in the emulator (i don't know the file explorer very well but i assume the lib folder is empty)
@DenisBronx It is a symbolic link point to the anther directory. Please help to check if /data/app-lib/it.fortech.fotechmobilepayment contains the librealm-jni.so . That directory should have sub directories like x86 arm etc.
@beeender it is empty i believe

any updates?
I think I'm having the same problem. Did you find a solution?
Finally figured out my issue like 5 hours later.... -_- make sure your gradle version is not:
classpath 'com.android.tools.build:gradle:+'
I changed mine to the latest and it works like before
classpath 'com.android.tools.build:gradle:1.3.1'
thanks @luca992, it works!
It is quite strange since we don't depend on any version of gradle or the android plugin… Anyway, it is good to see that this problem is solved! I am closing this issue now, thanks for the feedback!
Both my coworker and I are seeing this independently and changing the gradle version did not help.
EDIT: It turns out that we had an outdated gradle version referenced at a level above. Updating that fixed everything.
thanks @luca992, I actually had to set my gradle version to 1.3.0 for it work
Has this been reported to b.android.com, this seems to be a build issue with build tools 1.4.0-beta.
This same, build issue with build tools 1.4.0-beta
This problem still happen in build tools 1.4.0-beta2. Is there a any progress?
I left a bug report on the Android Developer Tools Google+ Community as I had the same issue: https://plus.google.com/+LudovicVialle/posts/7BRvbb3uKCY
I tried the Jar, same issue, the .so are not copied for any ABI. I think this is an issue within the latest build tools and Gradle.
Reopening this just so it is more visible, in case anyone else run into this problem. However it doesn't sound like it is something we can do much about at this time unfortunately.
This bug report on the bug tracker https://code.google.com/p/android/issues/detail?id=182061 seems to indicate it is fixed but not yet released for some reason.
I have a similar error message:
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.shareyourproxy-1/base.apk"],nativeLibraryDirectories=[/data/app/com.shareyourproxy-1/lib/arm, /vendor/lib, /system/lib]]] couldn't find "librealm-jni.so"
Like the error says, "lib/arm/librealm-jni.so" is missing from the compiled dependencies. I've tried downloading the realm-0.82.2.jar on the website to use as a local copy. I've extracted the contents of the jar and copied the contents of "lib/armeabi/librealm-jni.so" into the previously mentioned folder hierarchy to attempt to mitigate the error. When I repackage the jar, I can't use it to import any io.realm packages in my java like I could with the original unmodified jar.
I'm using:
Android Studio 1.4 RC-2
buildToolsVersion '23.0.1'
'com.android.tools.build:gradle:1.3.2' <-- I've tried many versions explicitly
Had the same issue, used 'com.android.tools.build:gradle:1.2.3' to resolve.
And my app was using latest google+ integration (version 8.1.0) and I had to revert to older version of google+ library to resolve the issue.
1.4.0-beta3 gradle plugin should fix it based on the release notes: https://sites.google.com/a/android.com/tools/tech-docs/new-build-system#release-notes
I did not tested yet.
@lvialle No it isn't fixed yet, unfortunately. I just tried it like an hour ago.