【NoClassDefFoundError】 create dialog class An error occurred while using this class
已回答



请先登录再写评论。
It's impossible to diagnose this via screenshots. Somehow your FigmaInputDialog class is either not compiled or not deployed in the sandbox instance correctly. Try to rebuild the project.
I found the reason for this problem. If I choose Kotlin when creating the project, this problem will occur. If I choose java, this problem will not occur. I think this is a serious bug. You can create a demo project to reproduce this problem.
More info: I created a plugin project targeting Android studio Below is the gradle file (when choose java )
plugins {
id("java")
id("org.jetbrains.intellij") version "1.8.0"
}
group = "com.example"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
// Configure Gradle IntelliJ Plugin
// Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
intellij {
version.set("2021.3.3")
type.set("IC") // Target IDE Platform
plugins.set(listOf("android"))
}
tasks {
// Set the JVM compatibility versions
withType<JavaCompile> {
sourceCompatibility = "11"
targetCompatibility = "11"
}
patchPluginXml {
sinceBuild.set("213")
untilBuild.set("223.*")
}
signPlugin {
certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
privateKey.set(System.getenv("PRIVATE_KEY"))
password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
}
publishPlugin {
token.set(System.getenv("PUBLISH_TOKEN"))
}
runIde {
ideDir.set(File("C:\\Program Files\\Android\\Android Studio"))
}
}
You may try something like this repo to compile the UI designer forms to Java classes in Gradle:
https://github.com/edward3h/systray-mpd/blob/master/build.gradle
However, I didn't try to mix it with Gradle IntelliJ Plugin yet...
You can't use Kotlin with Form Designer. Use Kotlin UI DSL instead. https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#ui-forms-in-kotlin