In the Android Studio:

  1. Find action (ctrl + shift + A / command + shift + A)
  2. Search for Choose Boot Java Runtime for the IDE
  3. Select the latest version in the “New:” dropdown boot-runtime-for-ide
  4. OK
  5. Restart