When I try to compile in Android Studio, the program says that sdkVersion 21 requires compiling with JDK is required. Although I installed JDK 7 (and later 8) and my terminal says that they were installed, only the 1.6.0.blabla version is visible as an installed Java Virtual Machine in my folders... How can I fix this?
Note that I am on Windows, so pathname format would be different, but rest of the steps should work fine.
In Android Studio, go to: File > Project Structure > SDK Location and make sure that the JDK Location property has valid path pointing to JDK installed on your system.
On Windows, that property value is "C:\\Program Files\\Java\\jdk1.7.0_55", so you can make a good guess as to what it should be on MacOS.
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.