【Android】协程+Retrofit:Unable to create call adapter for class

在使用 协程 + Retrofit 的时候,遇到这个错误:


error

这个错误可能是由以下两个原因造成的:

  • Retrofit 版本在 2.6.0 以下,升级即可。
  • Api 接口类中的函数没有使用 suspend 关键字修饰。

你可能感兴趣的:(【Android】协程+Retrofit:Unable to create call adapter for class)