How Can We Reference Kotlin Constants in a Java Annotation Declaration?

后端 未结 1 630
南方客
南方客 2020-12-18 22:38

Given this bit of Kotlin:

object OldTownRoad {
  const val COWBOY_HATS = \"from Gucci\"
  const val WRANGLER = \"on my booty\"
}

and this J

相关标签:
1条回答
  • 2020-12-18 23:22

    I forgot to see if this was an Android Studio bug. :facepalm:

    It turns out that if you run the code, it runs fine. Android Studio 3.5.3 appears to be complaining needlessly.

    I filed a bug report to try to get confirmation of the problem.

    Many thanks to @natario, whose comment made me realize that this might be an IDE problem!

    0 讨论(0)
提交回复
热议问题