Android license status unknown and a weird problem. Actually, the problem got solved after installing jdk 8 and setting JAVA_HOME accordingly this new jdk. Also in the sdkmanager.bat file, located in C:\Users\username\AppData\Local\Android\Sdk\tools\bin I added the line set:
No need to uninstall java 10. That solved the whole problem!
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.