Kotlin: unresolved reference

已回答

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
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

请先登录再写评论。