Is it possible to suppress this warning?
# getting-started
c
Is it possible to suppress this warning?
For local dev this value will always be
0
c
Ooh. I think I filed a bug for this and they didn't seem to understand it
c
We’ve made updates to our build recently such that the version info is obtained from the environment, ie
System.getenv("ANDROID_VERSION_CODE")?.toInt() ?: 0
s
@Suppress("KotlinConstantConditions")
c
@Sam thank you, that does it. It’s a bit too bad I have to apply it to a field, and not the specific line of code I want to
Alternatively I could just set this value in my local environment. Hmmm
c
I was just in the process of moving this line of code into its own function so I could suppress that function. Then Android Studio suggested I convert it to a range check instead, and there’s no warning on the range check. So, la de da
Thanks Colton