Reputation: 3
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?
Upvotes: 0
Views: 314
Reputation: 2860
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.
Upvotes: 1