Kotlin: unresolved reference

Answered

Intellij 2016.2.5, Kotlin 1.1 M2

 

I keep getting:

> Error:(14, 20) Kotlin: Unresolved reference: register

 

import com.sun.jna.*
class OpenVR : Library {
companion object {
init {
Native.register(NativeLibrary.getInstance("openvr_api"))
}
}
}

 

I already tried to invalidate cache and restart, it didn't help..

1
4 comments
Avatar
Permanently deleted user

I am getting similar error as OP.  Is this not jetbrains-related discussion?

0

Please use the appropriate resources for Kotlin specific problems in order to get help faster. Support will be provided by JetBrains anyway, but this specific forum is not monitored by Kotlin developers.

0

If I recall it right, at the end I solved by moving that call into a specific fun and call it explicitely

0

Please sign in to leave a comment.