适用于 Android Studio 的插件 - Retrofit 依赖问题

问题描述

我正在为 Intellij 2020.1.4 中的 Android studio 4.1.1 创建自定义插件。问题是,当从 Intellij 运行它时,它工作正常,但在 AS 中将其作为 jar 文件导入时出现错误

2021-01-28 19:53:41,726 [6064853]  ERROR - llij.ide.plugins.PluginManager - retrofit2/Retrofit$Builder 
java.lang.NoClassDefFoundError: retrofit2/Retrofit$Builder
    at actions.GenerateKeyFrame.getKey(GenerateKeyFrame.kt:223)
    at actions.GenerateKeyFrame.access$getKey(GenerateKeyFrame.kt:18)
...

build.gradle 中的依赖

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
    compile 'com.squareup.retrofit2:retrofit:2.9.0'
    compile 'com.squareup.retrofit2:converter-gson:2.9.0'
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)