最近,我尝试使用Kotlin/Native将CLI工具从JVM转换为本机可执行文件。我得到以下错误(这是有意义的):
> Task :compileKotlinMain FAILED
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (4, 8): Unresolved reference: java
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (5, 8): Unresolved reference: java
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (6, 8): Unresolved reference: java
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (9, 14): Unresolved reference: System
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (9, 27): Unresolved reference: System
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (12, 20): Unresolved reference: InputStream
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (12, 38): Unresolved reference: PrintStream
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (16, 57): Unresolved reference: BufferedReader
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (19, 80): Unresolved reference: PrintStream
e: C:\test1\src\main\kotlin\cli\CommandLineTool.kt: (19, 100): Unresolved reference: BufferedReaderJava支持的控制台I/O的替代方案是什么?有没有这样的库?谢谢。
https://stackoverflow.com/questions/60493464
复制相似问题