Java Development Kit (JDK) directory is not set or invalid

I am facing following error while trying to build an android app:

There are warnings in preferences:

And if I try to untoggle these warning messages little changes, it still does not allow me to build:

All of these modules are installed:

Judging by their folders size, installation is complete:
OpenJDK - 153 MB
SDK - 523 MB
NDK - 3,54 GB

I also tried to reinstall this editor version with all android build support modules, but its no use.

I solved it by reinstalling unity hub to 3.10 version and unity editor itself later.

But whole situation still looks like a bug.