I updated Java, JDK (
javac and so on) on my Ubuntu 14, trying out various methods (for which I asked this question).
So after many troubles I'm 99.9% sure Java has been updated on the OS (if I type
java -version on terminal, it gives me
Java version 1.8.0_101)
But Android Studio, which is the principal reason for my updating the JDK, still gives and error like
"I cannot compile due to the fact that Java 1.8 version is needed" (sorry if i don't have the precise message. If it's needed I will update it)
So the problems seems to be related to Android Studio, not Ubuntu.
How do I make Android Studio notice that I updated my Java version?
- I'm pretty that my already set as default the 1.8 version, not the 1.7 (I used the
sudo update-alternatives --config javacommand...
- I installed Android Studio while I still had the 1.7 Java version on my pc, which could have caused this problem
- (Related to the above point): I actually de-installed and re-installed Android Studio (although it's just a folder to be decompressed, nothing really "installs") but it still gives the error message.
Just a last thing (which may seem odd): actually, before I updated the message was regarding the JDK version, and Android Studio could not even render the application look. After the message concerns more Java version (not JDK) and the application look is rendered, but it does not COMPILE the project.
I'm really sorry for my bad english and the confusion I may have made. Hoping someone will help, thank you really much :)