https://kotlinlang.org logo
#android
Title
# android
a

A. Sachdeva

04/18/2021, 3:57 PM
after upgrading to android studio 4.1 , i am getting this warning for using switch cases in one particular java code:
Resource IDs will be non-final in Android Gradle Plugin version 5.0, avoid using them in switch case statements
. i found this article related to this issue : http://tools.android.com/tips/non-constant-fields . i usually use kotlin, but maintain some java projects. as a kotlin user, is it still okay to use
when-else
blocks with resource ids? or would that be impacted too ?
😶 2
😑 1
👴 1
how is this not related to both kotlin and android ?
c

Chrimaeon

04/24/2021, 8:44 PM
Because
switch
is a java statement 😅
a

A. Sachdeva

05/06/2021, 6:01 AM
@Chrimaeon the java part was background context. the main question was
as a kotlin user, is it still okay to use when-else blocks with resource ids? or would that be impacted too ?
3 Views