How to fix this error when building the kotlin ar...
# arrow
h
How to fix this error when building the kotlin arrow project? Does kotlin arrow requires Java 10?
Copy code
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':arrow-annotations-processor'.
    at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:79)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:73)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.access$400(LifecycleProjectEvaluator.java:54)
    at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.run(LifecycleProjectEvaluator.java:107)
    
Caused by: org.gradle.api.GradleScriptException: A problem occurred evaluating project ':arrow-annotations-processor'.
    at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:92)
    at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl$2.run(DefaultScriptPluginFactory.java:206)
    at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:77)

Caused by: org.gradle.api.GradleException: tools.jar not found at your JAVA_HOME dir /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home.
Building with a JRE or JDK9 is currently not supported.
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
g
kapt doesn’t work with Java 9+
it’s known issue
See error message “Building with a JRE or JDK9 is currently not supported”, so you problem that you build on Java 9+
h
okay
Copy code
Caused by: org.gradle.api.GradleException: tools.jar not found at your JAVA_HOME dir /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home.
should i build using java10 instead?
g
According to this error message you already build using Java 10
which is not supproted, you should use Java 8 for Kapt builds
h
thaks
p
thanks for spotting it @gildor 😄