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!
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
Paul Yorde10,497 Points
java.time package not recognized or does not exist. Shouldn't this be a part of the standard JDK?
I am getting an error complaining that the java.time package does not exist. I have imported at the top of the Gif.java, GifController filess as so:
It is however being recognized when I Use LocalDate to declare the variable. But then it says can't recognize symbol to the variable it allowed me to make.
Seth Kroger56,412 Points
LocalDate is an addition to the JDK in Java 8. If the installed JDK version is lower than 8 or the language level of the project is lower, you won't be able to use it. (check the sourceCompatibility setting in the build.gradle file.)
I tried doing that and I got a pop-up showing "unindexed remote maven repositories found" in IntelliJ. I tied updating the Repositories and I ended up with "Java.lang.RunTimeException: java.io.IOException: Transfer for nexus-maven-repository-index.gz failed" error
Can somebody help me on this.
Edward Poon9,313 Points
The following fixed the issue for me so hopefully it will help you. Go to the toolbar and click on IntellijIDEA -> Preferences -> (On the Left Hand side) Build, Execution, Deployment -> Gradle and in the Gradle JVM specify it was 1.8. Mine was specified as 1.7 so changing it to 1.8 fixed it for me.