While compiling i get the error Error:compileSdkVersion android-21 requires compiling with JDK 7, saying that a newer version of JDK is required.
I\'m r
/usr/libexec/java_home
File -> Project structure -> JDK location
edit(click on square with three dots) JDK location(2nd in image) and paste command line tool output there.
I have gathered these instructions using MacBook Pro.