I have defined some constants in kotlin
object Keys {
const val SPLASH_DURATION : Long = 5000
const val READ_TIMEOUT : Int = 200
const val CONNECTION_TIMEOUT : Int = 200
const val WRITE_TIMEOUT : Int = 200
var BASE_URL = BuildConfig.SERVER_KEY
}
- If I try to access BASE_URL in a Java class as
Keys.BASE_URL. I get the error, It has private access. - How to resolve this. Should I need to declare constants differently in kotlin.
