Issue
How does one mark a var in Kotlin volatile?
volatile public var tmpEndedAt: Long? = null
Is giving me the error: "unresolved reference: volatile".
Solution
I decided to give Kotlin a shot by just using the "convert java to kotlin" function in IntelliJ. Apparently that set things up wrong.
I tried doing the same thing, but after applying the Kotlin Gradle plugin and placing the file in src/kotlin
and it all worked. Thanks for the help anyway guys.
The code would be:
@Volatile var tmpEndedAt: Long? = null
Answered By - Andrew Cholakian
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.