문제
Retrofit2으로 공공API 불러오려고 하는데 "No type arguments expected for class Call" 라는 에러가 발생했다.
원인
Call을 import할 때 retrofit2가 아닌 okhttp3.Call을 import 하고 있었다.
해결
import okhttp3.Call을 지우고
import retrofit2.Call
추가해줬다.
레퍼런스
https://dev-cini.tistory.com/30
[ Error ] 안드로이드 No type arguments expected for class Call
Retrofit2 사용 시 "No type arguments expected for class Call" 라는 에러가 발생 할 경우 import 부터 확인!! 필자는.. android.telecom.Call 이걸 임포트 해줬었다.. 하지만 retrofit2.Call이게 맞다
dev-cini.tistory.com
'TroubleShooting' 카테고리의 다른 글
[TroubleShooting/Ubuntu] kernel panic not syncing virtualbox Error (0) | 2023.03.27 |
---|---|
[Android/Error] Invalid Gradle JDK configuration found (0) | 2023.01.17 |
[Android/Error] Keytools, OpenSSL 오류 (0) | 2022.11.28 |
[Android/Kotlin/Error] Button과 Text가 왼쪽으로 밀림 이슈 (0) | 2022.10.18 |
[Android] viewBinding으로 EditText 값 intent로 보내기 (0) | 2022.10.10 |