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
In which task and step of the codelab can this issue be found?
Object declarations :
Step 2
object MarsApi {
val retrofitService : MarsApiService by lazy {
retrofit.create(MarsApiService::class.java) }
}
Describe the problem
Not able to declare use the property retorfit inside the object and it throws an error for the same,
instead of creating the singleton object, the retrofit object can be created in the companion object with no errors I guess.
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
In which task and step of the codelab can this issue be found? Object declarations : Step 2 object MarsApi { val retrofitService : MarsApiService by lazy { retrofit.create(MarsApiService::class.java) } }
Describe the problem Not able to declare use the property retorfit inside the object and it throws an error for the same, instead of creating the singleton object, the retrofit object can be created in the companion object with no errors I guess.
Like This : companion object { private const val BASE_URL = "https://android-kotlin-fun-mars-server.appspot.com"
Steps to reproduce?
Versions Android Studio version: API version of the emulator:
Additional information Include screenshots if they would be useful in clarifying the problem.