【发布时间】:2019-05-16 04:27:52
【问题描述】:
尝试在 IntelliJ 中构建 Kotlin/Ktor 应用程序时,出现多个表单警告
Warning:(276, 6) Kotlin: This class can only be used with the compiler argument '-Xuse-experimental=kotlin.Experimental'
是输出。警告指的是
@UseExperimental(KtorExperimentalLocationsAPI::class)
所以我希望通过将 Settings -> Build -> Compiler -> Kotlin Compiler -> Additional command line parameters 设置为 -version -Xuse-experimental=kotlin.Experimental 来满足警告。 (-version 已经存在)。但是仍然会产生警告。我如何满足它?期待中的感谢。
【问题讨论】:
-
你应该按照提示,尝试使用@UnstableDefault
标签: intellij-idea kotlin compiler-warnings ktor