Welcome to the Treehouse Community
Looking to learn something new?
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,403 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.