Questions tagged [kotlin-lateinit]

78 questions
0
votes
1 answer

Singleton database object with parameterized initialization on startup?

I'm attempting to create a single database instance that can be used by multiple classes (using object keyword in Kotlin). However, I wanted to be able to specify the database name before the singleton instance is created. Since a singleton object…
-1
votes
1 answer

How to initialize lateinit var with 'by keyword' in kotlin

I want to initialize lateinit variable with 'by'. How can I? lateinit var test: int fun main() { test by something {} // error! } I tried using by in by lazy, and I tried using by in lateinit var, but it didn't work.
recsater
  • 1
  • 2
-2
votes
1 answer

Late init in Kotlin

I write a code to login and email and google sign in but I got and error in Logcat,so I read it and it caused by late init proverty in my code,I try searching pproblem in overflow but I did not find…
1 2 3 4 5
6