找回密码
 初始化身份识别芯片
查看: 507|回复: 1

请问构建jar时提示一堆kotlin相关错误要怎么解决?

[复制链接]

巡洋大副

发表于 2025-9-9 21:59:57 | 显示全部楼层 |阅读模式
拿现有的mod自己改了下,构建时就报了一堆错:
Kotlin: Cannot access built-in declaration 'kotlin.Float'. Ensure that you have a dependency on the Kotlin standard library
Kotlin: Cannot access built-in declaration 'kotlin.Float'. Ensure that you have a dependency on the Kotlin standard library
Kotlin: Cannot access built-in declaration 'kotlin.Float'. Ensure that you have a dependency on the Kotlin standard library
Kotlin: Cannot access built-in declaration 'kotlin.Float'. Ensure that you have a dependency on the Kotlin standard library
Kotlin: Cannot access built-in declaration 'kotlin.Float'. Ensure that you have a dependency on the Kotlin standard library
Kotlin: Cannot access built-in declaration 'kotlin.Float'. Ensure that you have a dependency on the Kotlin standard library
Kotlin: Cannot access built-in declaration 'kotlin.Float'. Ensure that you have a dependency on the Kotlin standard library
Kotlin: Cannot access built-in declaration 'kotlin.Float'. Ensure that you have a dependency on the Kotlin standard library
Kotlin: Cannot access built-in declaration 'kotlin.Double'. Ensure that you have a dependency on the Kotlin standard library
Kotlin: Cannot access built-in declaration 'kotlin.Double'. Ensure that you have a dependency on the Kotlin standard library
Kotlin: Cannot access built-in declaration 'kotlin.Float'. Ensure that you have a dependency on the Kotlin standard library
把IDEA的kotlin插件更新了下好像也没啥效果

战列舰长

发表于 2025-9-11 19:26:58 | 显示全部楼层
光看这个报错也不知道具体是什么情况啊。

我猜要么mod本身是用java写的,但是是用gradle构建的,gradle的构建配置是用Kotlin写的,在使用gradle来build的时候报了kotlin 的问题。要么mod本身是用Kotlin写的,编译的时候就是缺少依赖,在 pom.xml 或者 build.gradle 之类的地方把依赖加上就行了。

本版积分规则

Archiver|手机版|小黑屋|远行星号中文论坛

GMT+8, 2025-12-6 02:52

Powered by Discuz! X3.5

© 2001-2077 Tencent Cloud | Durian Software Studio

快速回复 返回顶部 返回列表