You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recently bumped our Android app to
Realm 10.16.0
Kotlin 1.8.21
Gradle 8.0.2
kotlinCompilerExtensionVersion 1.4.7
And due to some kapt related error we also had to specifically set Java to the app and its modules like:
With this setup we are getting an error when trying to run our unit tests and these unit tests use Java objects that include the LinkingObjects annotation:
java.lang.IllegalAccessError: Update to non-static final field com.example.myapplication.objects.Dog.owners attempted from a different method (realmSet$owners) than the initializer method <init>
This error maybe related to these ones: #7799 #7804
converting the related Java objects to Kotlin ones
Unfortunately both solutions are risky or hacky (the first one) or require too much work (the second one) and are not acceptable for the time being.
Stacktrace & log output
java.lang.IllegalAccessError: Update to non-static final field com.example.myapplication.objects.Dog.owners attempted from a different method (realmSet$owners) than the initializer method <init>
Can you reproduce the bug?
Always
Reproduction Steps
For this reason I created a demo project based on the same setup as our project which demonstrates the same behaviour MyApplication.zip
I've got the same problem with my Java application after upgrading to AGP 8.0.2 and Java 17. Do you still use workarounds to solve it or we have any chance to get it fixed?
How frequently does the bug occur?
Always
Description
We recently bumped our Android app to
Realm 10.16.0
Kotlin 1.8.21
Gradle 8.0.2
kotlinCompilerExtensionVersion 1.4.7
And due to some kapt related error we also had to specifically set Java to the app and its modules like:
With this setup we are getting an error when trying to run our unit tests and these unit tests use Java objects that include the LinkingObjects annotation:
java.lang.IllegalAccessError: Update to non-static final field com.example.myapplication.objects.Dog.owners attempted from a different method (realmSet$owners) than the initializer method <init>
This error maybe related to these ones:
#7799
#7804
Two workarounds that we tried and worked are
instead of:
Unfortunately both solutions are risky or hacky (the first one) or require too much work (the second one) and are not acceptable for the time being.
Stacktrace & log output
Can you reproduce the bug?
Always
Reproduction Steps
For this reason I created a demo project based on the same setup as our project which demonstrates the same behaviour
MyApplication.zip
Version
Android 13
What Atlas App Services are you using?
Local Database only
Are you using encryption?
Yes
Platform OS and version(s)
Android 13
Build environment
Android Studio version: Flamingo | 2022.2.1
Realm 10.16.0
Kotlin 1.8.21
Gradle 8.0.2
kotlinCompilerExtensionVersion 1.4.7
The text was updated successfully, but these errors were encountered: