Closed Usman3900 closed 8 months ago
name: Android Basics Unit 4 issue about: Report problems with the Android Basics Unit 4 codelabs title: 'Android Basics Unit 4 issue:' labels: '' assignees: ''
URL of codelab https://developer.android.com/codelabs/basic-android-kotlin-training-getting-data-internet?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-4-pathway-2%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-getting-data-internet#5
In which task and step of the codelab can this issue be found? Connection to the internet.
Describe the problem We need to add internet permissions to avoid the app crash but even after adding permission app still crashes.
Error followed is : java.lang.IllegalArgumentException: Unable to create call adapter for class java.lang.String for method MarsApiService.getPhotos
Steps to reproduce?
Versions Android Studio version: ChipMunk | 2021.2.1 Patch 1 API version of the emulator: API 30
Additional information Include screenshots if they would be useful in clarifying the problem.
Problem can be resolved by making the getPhotos() function suspend
name: Android Basics Unit 4 issue about: Report problems with the Android Basics Unit 4 codelabs title: 'Android Basics Unit 4 issue:' labels: '' assignees: ''
URL of codelab https://developer.android.com/codelabs/basic-android-kotlin-training-getting-data-internet?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-4-pathway-2%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-getting-data-internet#5
In which task and step of the codelab can this issue be found? Connection to the internet.
Describe the problem We need to add internet permissions to avoid the app crash but even after adding permission app still crashes.
Error followed is : java.lang.IllegalArgumentException: Unable to create call adapter for class java.lang.String for method MarsApiService.getPhotos
Steps to reproduce?
Versions Android Studio version: ChipMunk | 2021.2.1 Patch 1 API version of the emulator: API 30
Additional information Include screenshots if they would be useful in clarifying the problem.
Problem can be resolved by making the getPhotos() function suspend