首页 > 解决方案 > 在 Kotlin 中使用 java 9 编译库

问题描述

我正在尝试在 Kotlin 中使用来自 google 的 or-tools java 库,问题是在编译时,它给了我以下错误:

java.lang.UnsupportedClassVersionError: com/google/ortools/constraintsolver/RoutingModel has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0

那么,是否可以在 Kotlin 中使用这个库,或者我应该用 Java 重写软件?

标签: javakotlinor-tools

解决方案


推荐阅读