Realm Java has build problem with Android Studio 4.2

I have entered a post on StackOverflow here that describes the issue in detail, including stack traces from running gradlew from the command line and posting the stack trace to pastebin.

Essentially, the problem is that on an incremental build I am getting a kotlin null pointer error, the relevant aspect of the stack trace is:

Caused by: kotlin.KotlinNullPointerException
        at io.realm.processor.ModuleMetaData.getClassListFromModule(ModuleMetaData.kt:337)
        at io.realm.processor.ModuleMetaData.validateNamingPolicies(ModuleMetaData.kt:170)
        at io.realm.processor.ModuleMetaData.preProcess(ModuleMetaData.kt:113)
        at io.realm.processor.RealmProcessor.preProcessModules(RealmProcessor.kt:241)
        at io.realm.processor.RealmProcessor.process(RealmProcessor.kt:178)

I am using 10.4.0 annotations processor, which I believe is the latest (also that version of the SDK).

All -

Any update on this at all? This is a major pain for working with Realm and Android Studio 4.2. I either have to do full rebuilds or request multiple incremental builds.

@Tad_Frysinger Have you filed an issue on our developer github? GitHub - realm/realm-java: Realm is a mobile database: a replacement for SQLite & ORMs

I just did here: Android Studio throws a null pointer on incremental builds pointing back to Realm · Issue #7473 · realm/realm-java · GitHub

1 Like

@Ian_Ward is there any update? It has actually gotten worse for me, I’ve updated the comments on the developer github, and I’ve noticed another user submitted a small project reproducing the problem. Please help!