Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Weather App (2015) Exploring an API Creating the Project

Steve Marreros Chuco
Steve Marreros Chuco
9,900 Points

How to fix "android-21 requires ... JDK7"?

I have gotten the Android Studio Version suggested in the teacher's note. After I created the Stormy project, a error popped up: CompileSDKversion android-21 requires compiling with JDK 7.

I've attempted to fix it with no success so far. I did this:

  1. File > Project Structure > app. Then, change source and large Compatibility to 1.7. The same error was still there.

  2. File > Other settings > default settings. Compiler > Java Compiler. I changed the Project byte code version to 1.7. It did't work out either.

  3. I've tried to modify some numbers within build.graddle (app). Nothing happened.

  4. I've downloaded several times different 7.something JDK version from Oracle. None of them was finally recognize by the console when search for one of them.

How can I fix this issue? Thank you!