Reputation: 35
My question is about an error in Android Studio.
I'm getting a JDK error whenever i try to build my app because Android Studio is struggling ti find where the JDK is installed.
How can i fix this error? Thanks
Upvotes: 2
Views: 6368
Reputation: 301
1) Download JDK
2) Android Studio -> File -> Project structure -> JDK location. Point at where you have installed it.
Upvotes: 1
Reputation: 3158
You can use cmd + ; for Mac or Ctrl + Alt + Shift + S for Windows/Linux to pull up the Project Structure dialog. In there, you can set the JDK location as well as the Android SDK location.
Use embedded JDK or else point to your JDK directory. To get your JDK location, run /usr/libexec/java_home -v 1.7
in terminal. Send 1.7 for Java 7 or 1.8 for Java 8.
Upvotes: 4