install the android SDK for me was not the problem, having the right JRE and JDK was the problem.
To solve this install the JVM 8 (the last fully compatible, for now):
sudo apt-get install openjdk-8-jre
Next use update-alternative to switch to the jre-8 version:
sudo update-alternatives --config java
You can revert JVM version when you want with the same update-alternatives
command
Note that you problably have to do the same after this with javac
also (now you have only java
command at version 8)
first do:
sudo apt-get install openjdk-8-jdk
next:
sudo update-alternatives --config javac
After this you can install android SDK that require this specific Java version