google-developer-training / basic-android-kotlin-compose-training-mars-photos

Solution code for Android Basics in Kotlin course
https://developer.android.com/courses/android-basics-kotlin/course?gclid=CjwKCAjw4c-ZBhAEEiwAZ105RTyT-iaLHzrhMBUXdMhO230ZDwOwxxI2x4RgK8DwBxK8t1h0wmU_QxoCi4YQAvD_BwE
Apache License 2.0
66 stars 54 forks source link

Get Data from the Internet #99

Open Wesley-Nunes opened 7 months ago

Wesley-Nunes commented 7 months ago

URL of codelab: https://developer.android.com/codelabs/basic-android-kotlin-compose-getting-data-internet

Specify the language of the codelab if it is not English:

In which task and step of the codelab can this issue be found? 6. Connecting to the Internet >> 5.Add the following constant for the base URL for the web service.

Describe the problem The app crashes because baseUrl must end in /. The snippet on the code lab

private const val BASE_URL = 
   "https://android-kotlin-fun-mars-server.appspot.com"

It should be updated to

private const val BASE_URL = 
   "https://android-kotlin-fun-mars-server.appspot.com/"

Steps to reproduce? Follow the steps described in the code lab. Try to run the app. The error will occur.

Versions Android Studio version: Android Studio Giraffe | 2022.3.1 Patch 2 API version of the emulator: API 33

Additional information Include screenshots if they would be useful in clarifying the problem.