I can't find anything on slashdot or google about this problem.. I am getting a crash in kotlin realm extensions...
Process: com.agersens.eshepardcollarfitter.production, PID: 9241
java.lang.IllegalAccessError: Method 'io.realm.RealmQuery io.realm.RealmQuery.createQuery(io.realm.Realm, java.lang.Class)' is inaccessible to class 'com.vicpin.krealmextensions.RealmExtensionsKt' (declaration of 'com.vicpin.krealmextensions.RealmExtensionsKt' appears in /data/app/com.agersens.eshepardcollarfitter.production-1/split_lib_dependencies_apk.apk)
at com.vicpin.krealmextensions.RealmExtensionsKt.forEntity(RealmExtensions.kt:246)
at com.vicpin.krealmextensions.RealmExtensionsKt.queryFirst(RealmExtensions.kt:41)
at com.maiatehcology.maialibrary.syncframework.database.DatabaseWrapper.fetchAnimals(DatabaseWrapper.kt:78)
The code is very very similar to what I used in a previous project without incident...
c
Casey Kulm
03/01/2018, 10:16 PM
You are using a function you are not allowed to
Casey Kulm
03/01/2018, 10:17 PM
I couldn’t put it much clearer than the stacktrace does
r
Regan Russell
03/02/2018, 12:24 AM
you are wrong.... I did not write kotlin realm extensions
I am calling queryFirst() on a 'com.vicpin.krealmextensions
object.
I fixed the issue just then by changing the version number for rxjava in the gradle build
Confusing issue from a 3rd party library and "just look at the stack trace" was not helpful at all
c
Casey Kulm
03/02/2018, 12:58 AM
You ‘indirectly’ were using a function you are not allowed to is correct 👍