[안드로이드 공부]/UI
Resource IDs will be non-final by default in Android Gradle Plugin version 8.0, avoid using them in switch case statements
코코모모
2023. 6. 5. 15:51
switch 문에서 case R.id.xxxx 를 더 이상 제공 하지 않는다고 한다.
간단하게 if else 문으로 대체 하면 되는데
case 문이 많을 경우 난감하고 귀찮다.
이럴 때는 간단히 Refactoring 을 하면 된다.
switch 에 커서를 올리고
Option(Windows Alt) + enter 를 치고
Replace switch with if 를 선택하면 한 방에 해결 된다.