Hi all, I am experiencing a strange issue with cac...
# android
p
Hi all, I am experiencing a strange issue with cache and
internal const val
. Follow the thread:
When using this
internal const val
with value
16
with Retrofit, it works.
During the development, I set this value to 25 once
then I updated it to 15 here:
Screenshot 2024-04-25 at 13.27.21.png
Now note that retrofit is adding 25 to the URL.
which is the old value (and the first one to be set).
I tried to delete all the cache associated, deleted the build folders, restarted the mac, restarted the emulator and its data. I simply cannot make it generate the URL with 15 instead of 25.
Except if I do any below, it works: • hardcode 15 in the default value. Or, • do
DEFAULT_SEARCH_LIMIT.also { println(it) }
it’s just
internal const val DEFAULT_SEARCH_LIMIT = 15
that returns into 25.
I also tried to debug it with the Android debugger and it prints 15.
The project uses
Kotlin 1.7.10
If I set the type, it works:
internal const val DEFAULT_SEARCH_LIMIT: Int = 15
(note that there is only a single definition of
DEFAULT_SEARCH_LIMIT
in the whole project)