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 trialMichael McDonald
2,877 PointsHow do I troubleshoot installation errors with Android Studio, Java SDK, and gradle settings.
I had the Android Studio software available in the Treehouse teachers notes running well enough to follow lessons, but I was having trouble running an emulator.
Meanwhile, I setup git and Github and had to change several path settings to make Android Studio put and get projects where gitHub was getting and putting them. I was still coding and compiling fine though.
Now I want to get the emulator working and I decided to use GenyMotion. I had to reinstall virtual machine software and GenyMotion a couple times before it worked: not sure why. I don't remember what prompted me to upgrade Android Studio either, but that gave me more errors than can handle.
I followed directions on Oracle for uninstalling Java and I also uninstalled Android Studio and reinstalled the bundle from Treehouse. Now GenyMotion runs the emulator fine but I get gradle errors as soon as I launch Android Studio.
If I create a brand new empty project I get the message "Gradle project sync failed" and the build.gradle file reads "compileSdkVersion android-21 requires compiling with JDK 7error messages when creating a new project using the wizard. The gradle message reads "compileSdkVersion android-21 requires compiling with JDK7."
At one point, there were two versions of the JDK installed on my machine but now there seems to be just JDK 6.
1 Answer
christephens
9,470 PointsI can only help on a mac. This video https://www.youtube.com/watch?v=ztFAlAmjzfE will walk you through how to download JDK 8. Then go to File->Other Settings->Default Project Structure->SDKs and change the JDK path to /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home.
Hope that helps.
christephens
9,470 Pointschristephens
9,470 PointsAlso, if you ever install the most recent version there is a very annoying issue. Use this video https://www.youtube.com/watch?v=sK0kW851aRc and it will save hours of your life.
Michael McDonald
2,877 PointsMichael McDonald
2,877 PointsThanks, I tried the former and got the same errors as before. I tried the latter and I got "Early release JDK could cause issues. Please use a stable version." Then I got the same errors as before.