I am learning to build an Android app for the first time, and not even able to get past the set up stage!!
I am using a Mac on OS X 10.9.5. I have the latest version of Android Studio (2.1.2) and JDK/JRE 1.6 and 1.8 installed on my machine.
When I go to Android Studio > About Android Studio, it tells me the JRE is 1.6.
I'm also getting an error saying: "Rendering Problems Android N requires the IDE to be running with Java 1.8 or later Install a supported JDK"
I have JDK v1.8 installed.
In File > Project Structure > SDK Manager I have the following set:
Android SDK Location =
/Users/Tom/Library/Android/sdk
Android JDK Location =
/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home
When I enter
echo $JAVA_HOME
it displays the following:
/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home
When I enter
echo $JDK_HOME
it also displays the following:
/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home
Why is Android Studio not recognising the 1.8 JDK?? Have been googling for 3hrs and getting nowhere. Any advice hugely recommended.
Just move your default Android Studio JRE, in this case to move JDK 1.6.0, on OSX do this
sudo mv /Library/Java/JavaVirtualMachines/1.6.0.jdk /tmp
Then restart your Android Studio, and check "About Android Studio"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.