首页 文章

使用Gradle 3.1.2无法解决改造问题

提问于
浏览
4

从Gradle 2.x.x升级到Gradle版本3.1.2后,无法解析 retrofit2.Callback . 我在一个子模块中使用Retrofit,这个子模块添加如下:

api project(path: ':sdk', configuration: 'default')

改造依赖sdk是这样添加的:

api "com.squareup.retrofit2:retrofit:2.4.0"

我的错误信息是:

Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath: class ***, unresolved supertypes: retrofit2.Callback

IDE没有向我显示类中的问题,回调以某种方式丢失 . Android Studio版本为3.1.2 .

到目前为止我尝试了什么:

  • 清理Gradle缓存

  • 清理项目构建

  • 将Kotlin更新为1.2.41

1 回答

  • 1

    我通过在首选项 - >构建,执行,部署 - >即时运行中禁用“即时运行”来解决问题 .

相关问题