TRY ANDROID DEV

Android アプリ開発のコーディングネタ。あとエンジニアとしての活動

2018-12-22から1日間の記事一覧

kotlinでSmart cast to xxx is impossible because response.body() is a complex expressionが発生した場合

状況 Retrofitを使った以下のソースコードでスマートキャストできないとエラーが発生した。 override fun search(word: String): List<NovelIntroduction> { val response = searchService.getNovelList(word).execute() if (response.isSuccessful && response.body()!=null) {</novelintroduction>…