Specify the language of the codelab if it is not English:
In which task and step of the codelab can this issue be found?
Step 7 when ran the app on "Compile and run the app again." in Android Permissions part
Describe the problem
Got error java.lang.IllegalArgumentException: Unable to create call adapter for class java.lang.String. Seems like source of problem in retrofit. Stack trace shows that problem in getPhotos function
Solution:
Need to add suspend modifier to getPhotos() function
Steps to reproduce?
I just did what described in codelab.
Versions
_Android Studio version: Android Studio Hedgehog | 2023.1.1 Patch 2
API version of the emulator:
Additional informationInclude screenshots if they would be useful in clarifying the problem.
URL of codelab: https://developer.android.com/codelabs/basic-android-kotlin-compose-getting-data-internet?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-5-pathway-1%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-getting-data-internet#5
Specify the language of the codelab if it is not English:
In which task and step of the codelab can this issue be found? Step 7 when ran the app on "Compile and run the app again." in Android Permissions part
Describe the problem Got error java.lang.IllegalArgumentException: Unable to create call adapter for class java.lang.String. Seems like source of problem in retrofit. Stack trace shows that problem in getPhotos function
Solution: Need to add suspend modifier to getPhotos() function
Steps to reproduce? I just did what described in codelab.
Versions _Android Studio version: Android Studio Hedgehog | 2023.1.1 Patch 2 API version of the emulator:
Additional information Include screenshots if they would be useful in clarifying the problem.