我自己写了一个插件,使用了skiko库。在Idea能正常运行,在服务器上运行时,提示找不到so。报错位置为实例化Bitmap
尝试在libs下放了skiko-awt-runtime-windows-x64-0.7.32.jar,报错没变。
尝试用ShadowJar打包依赖,jar打包进去了,但是报错没变。
服务器:
Linux 64位
Mcl 2.1.1
Mirai-console 2.12.1
Mirai-console-terminal 2.12.1
Mirai-core-all 2.12.1
4f2c24f2-a89b-4fc7-927b-af1ff8827307-image.png
Build.gradle.kts:
plugins {
val kotlinVersion = "1.7.10"
kotlin("jvm") version kotlinVersion
kotlin("plugin.serialization") version kotlinVersion
id("net.mamoe.mirai-console") version "2.12.0"
id("com.github.johnrengelman.shadow") version "7.1.2"
}
dependencies {
implementation("org.jetbrains.skiko:skiko-awt-runtime-linux-x64:0.7.32") //shadowLink("org.jetbrains.skiko:skiko-awt-runtime-windows-x64")}
mirai {
jvmTarget = JavaVersion.VERSION_11
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "11"
}
repositories {
google()
gradlePluginPortal()
mavenCentral()
mavenLocal()
maven("https://androidx.dev/storage/compose-compiler/repository/")
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
buildscript {
repositories {
mavenLocal()
google()
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
}