0

I want to use a switch statement using Strings in Android Studio (version 3.2.1), this should compile because I am using a java version of 1.7 or higher (1.8). Nevertheless it still doesn't work. It gives: Incompatible types. Found: 'java.lang.String', required: 'byte, char, short or int'

1 Answers1

0

Actually it's clear, that's a problem with compiler settings in IDE.

Confirm once that you are using java 7 or higher.

enter image description here

Alien
  • 15,141
  • 6
  • 37
  • 57