try to use List instead of MutableList
if I use list it is giving errors((
which?
show errors please
Ilya can I share my source as gist
yes, but you better show errors
https://gist.github.com/kyodgorbek/57a4c038f0404b60d64f3716e52379de
what type of errors do you see in logs?
спасибо, а то у меня с английским не очень хорошо, хахах
u menya toje))))
Type mismatch. Required: Collection<Quotes> Found: CurrencyResponse?
finally
I have changed as answer suggested in my post
checking your post interface CurrenciesResponse { @GET("live?access_key=1f72464a836ff6084b8b1780e3feadf9") fun getCurrencies(): Call<CurrencyResponse> } return type CurrencyResponse then apiInterface.getCurrencies().enqueue(object : Callback <MutableList<Quotes>> why MutableList<Quotes> here? should be the same - CurrencyResponse
here another type) Callback <CurrencyResponse>
ilya I have changed already as you suggested
depending on your mistake you did the opposite
I am confused in mainactivity.kt
u should have the same type everywhere
now works? If not, can you send screenshot of logs, please?
I have to change adapter class as well
yup
you mean from quotes to currencyResponse in adapter as well right
yes
You need to make sure that the type you receive and the type you want to use match.
Ilya can I share my adapter and mainactivity.kt which I have updated
yes
https://gist.github.com/kyodgorbek/57a4c038f0404b60d64f3716e52379de
https://hatebin.com/iwlpeappub
thank you for your code but it is giving an errors
what kind?
add bracket } after error XD
added the same can you double check your code
fix it yourself, such primitive errors
I know but it is syntax erros I have checked did not understand what is causing errors
oh, i didn't notice move bracket from 33 line to 40
I moved it is still this erros
can you double check mainactivity,kt
Just try to learn basic of kotlin
I know kotlin
+
remove the last parenthesis on 50 line
Обсуждают сегодня