Ale*_*tev 8 android gradle gson retrofit2
在我的项目中,我看到注释 @SerializedName 未解析,即使我导入了它:
import com.google.gson.annotations.SerializedName
Run Code Online (Sandbox Code Playgroud)
我还有所有必要的 build.gradle 依赖项:
implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.retrofit2:adapter-rxjava2:2.6.2"
implementation "com.squareup.retrofit2:converter-gson:2.9.0"
implementation 'com.google.code.gson:gson:2.8.6'
Run Code Online (Sandbox Code Playgroud)
我已经同步了项目文件并多次重建,但 Android Studio 一直以红色突出显示注释。
最奇怪的是,一切都可以完美地编译、构建和运行,但是拥有所有红色元素会使项目的工作变得困难,我还能缺少什么?
| 归档时间: |
|
| 查看次数: |
525 次 |
| 最近记录: |