Unit Test and Realm

android

#1

I’m getting the below (unit-test related) error on my Android project, not when I manually run " ./gradlew :app:test" on my machine, but on the CircleCI build server. How can I solve this?

Test part of my circle.yml

test:
override:
- ./gradlew :app:test
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -regex “.*/build/test-results/.*xml” -exec cp {} $CIRCLE_TEST_REPORTS/junit/ ;

The Error

Your build ran 98 tests with 39 failures
checkRemoveChangedMediaFiles_Differ - org.test.test.data.control.ContentPageControllerTest
lessjava.lang.UnsatisfiedLinkError: Can’t load library: /tmp/android-tmp-robolectric4879062721030304246/app_lib/librealm-jni.so.3.2.1
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1827)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at com.getkeepsafe.relinker.SystemLibraryLoader.loadPath(SystemLibraryLoader.java:29)
at com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal(ReLinkerInstance.java:198)
at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:136)
at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:70)
at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:57)
at io.realm.internal.RealmCore.loadLibrary(RealmCore.java:60)
at io.realm.Realm.init(Realm.java:196)


#2