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

Add Repository #153

Open hwisulee opened 1 month ago

hwisulee commented 1 month ago

URL of codelab: https://developer.android.com/codelabs/basic-android-kotlin-compose-add-repository?hl=ko&continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-5-pathway-2%3Fhl%3Dko%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-add-repository#6

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

In which task and step of the codelab can this issue be found? 9.Write a repository test

Describe the problem In the part where the last runTest() was applied, there was a problem that the runTest() could not be found, so I reconfirmed the gradle dependence.

7.Get setup for local tests recommended testImplementation ("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.1"), but when I searched the Internet, I came to the conclusion that I should use androidTestImplementation() and the error was corrected.

Steps to reproduce?

  1. Go to this Codelab(Add repository and Manual DI) and follow steps.
  2. When you stepping on 9.Write a repository test, "Test coroutines" you can't acess runTest()
  3. See error...
  4. In gradle(Module: app), change this implementation "testImplementation ("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.1")" to androidTestImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.1")
  5. Sync Now and done.

Versions _Android Studio version:_Build #AI-232.10300.40.2321.11567975, built on March 13, 2024 _API version of the emulator:_34