Update JDK/JAVA in Android Studio
up vote
2
down vote
favorite
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?
Some notes:
- I'm pretty that my already set as default the 1.8 version, not the 1.7 (I used the
sudo update-alternatives --config java
command... - 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 :)
java jdk openjdk oracle android-studio
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
up vote
2
down vote
favorite
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?
Some notes:
- I'm pretty that my already set as default the 1.8 version, not the 1.7 (I used the
sudo update-alternatives --config java
command... - 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 :)
java jdk openjdk oracle android-studio
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
you need to specify "JAVA_HOME" at studio configs
– Taher Khorshidi
Sep 18 '16 at 8:07
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
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?
Some notes:
- I'm pretty that my already set as default the 1.8 version, not the 1.7 (I used the
sudo update-alternatives --config java
command... - 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 :)
java jdk openjdk oracle android-studio
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?
Some notes:
- I'm pretty that my already set as default the 1.8 version, not the 1.7 (I used the
sudo update-alternatives --config java
command... - 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 :)
java jdk openjdk oracle android-studio
java jdk openjdk oracle android-studio
edited Apr 13 '17 at 12:25
Community♦
1
1
asked Sep 12 '16 at 19:58
Ema Pall
1125
1125
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
you need to specify "JAVA_HOME" at studio configs
– Taher Khorshidi
Sep 18 '16 at 8:07
add a comment |
you need to specify "JAVA_HOME" at studio configs
– Taher Khorshidi
Sep 18 '16 at 8:07
you need to specify "JAVA_HOME" at studio configs
– Taher Khorshidi
Sep 18 '16 at 8:07
you need to specify "JAVA_HOME" at studio configs
– Taher Khorshidi
Sep 18 '16 at 8:07
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Go to File -> Project Structure
and check SDK Version. If lower than 1.8 change it.
If it is right, check build.gradle
file. Android build-tools 24.0.0 and higher requires Java 1.8. Try to lower them just for the moment.
Check also: https://discuss.gradle.org/t/cant-build-java-1-8-even-with-proper-java-version-in-use/2461/5
It may also a problem with too old Gradle version. Change gradle-plugin version to higher than 2.1.0
But the best way to fix a problem would be this: yesterday was released the newest Android Studio 2.2 with Gradle-plugin 2.2 and Android build-tools 24.0.3. Just update your IDE, it will also fix Gradle and build-tools version.
Hope it will help
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Go to File -> Project Structure
and check SDK Version. If lower than 1.8 change it.
If it is right, check build.gradle
file. Android build-tools 24.0.0 and higher requires Java 1.8. Try to lower them just for the moment.
Check also: https://discuss.gradle.org/t/cant-build-java-1-8-even-with-proper-java-version-in-use/2461/5
It may also a problem with too old Gradle version. Change gradle-plugin version to higher than 2.1.0
But the best way to fix a problem would be this: yesterday was released the newest Android Studio 2.2 with Gradle-plugin 2.2 and Android build-tools 24.0.3. Just update your IDE, it will also fix Gradle and build-tools version.
Hope it will help
add a comment |
up vote
0
down vote
Go to File -> Project Structure
and check SDK Version. If lower than 1.8 change it.
If it is right, check build.gradle
file. Android build-tools 24.0.0 and higher requires Java 1.8. Try to lower them just for the moment.
Check also: https://discuss.gradle.org/t/cant-build-java-1-8-even-with-proper-java-version-in-use/2461/5
It may also a problem with too old Gradle version. Change gradle-plugin version to higher than 2.1.0
But the best way to fix a problem would be this: yesterday was released the newest Android Studio 2.2 with Gradle-plugin 2.2 and Android build-tools 24.0.3. Just update your IDE, it will also fix Gradle and build-tools version.
Hope it will help
add a comment |
up vote
0
down vote
up vote
0
down vote
Go to File -> Project Structure
and check SDK Version. If lower than 1.8 change it.
If it is right, check build.gradle
file. Android build-tools 24.0.0 and higher requires Java 1.8. Try to lower them just for the moment.
Check also: https://discuss.gradle.org/t/cant-build-java-1-8-even-with-proper-java-version-in-use/2461/5
It may also a problem with too old Gradle version. Change gradle-plugin version to higher than 2.1.0
But the best way to fix a problem would be this: yesterday was released the newest Android Studio 2.2 with Gradle-plugin 2.2 and Android build-tools 24.0.3. Just update your IDE, it will also fix Gradle and build-tools version.
Hope it will help
Go to File -> Project Structure
and check SDK Version. If lower than 1.8 change it.
If it is right, check build.gradle
file. Android build-tools 24.0.0 and higher requires Java 1.8. Try to lower them just for the moment.
Check also: https://discuss.gradle.org/t/cant-build-java-1-8-even-with-proper-java-version-in-use/2461/5
It may also a problem with too old Gradle version. Change gradle-plugin version to higher than 2.1.0
But the best way to fix a problem would be this: yesterday was released the newest Android Studio 2.2 with Gradle-plugin 2.2 and Android build-tools 24.0.3. Just update your IDE, it will also fix Gradle and build-tools version.
Hope it will help
answered Sep 20 '16 at 18:54
piotrek1543
488412
488412
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f824158%2fupdate-jdk-java-in-android-studio%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
you need to specify "JAVA_HOME" at studio configs
– Taher Khorshidi
Sep 18 '16 at 8:07