In Artic Fox Canary 5, all my build.gradle.kts files are highlighted in red with the message:
Cannot access 'java.lang.Object' which is a supertype of 'org.gradle.api.artifacts.dsl.RepositoryHandler'. Check your module classpath for missing or conflicting dependencies
I am able to run my app well though.
j
Javier
02/05/2021, 8:18 AM
if same build works in another IDE, probably changing the JDK fixes the issue
j
Jeff
02/05/2021, 8:20 AM
I'm using the embedded JDK
j
Javier
02/05/2021, 8:32 AM
try another to confirm, sample oracle JDK 8
j
Jeff
02/05/2021, 8:58 AM
Thanks @Javier It worked like a charm!
🙂 2
l
Lena Stepanova
03/05/2021, 1:37 PM
@Jeff
Hi, I have the same issue after I upgraded to Canary 8, Gtools.build 7.0.0-alpha08, distribution 6.8.2-bin.zip
Now my gradle files are all marked with red underline and I get "Cannot access 'java.lang.Comparable' which is a supertype of..."
Can you please elaborate on how you solved it?
I'm using macOS
j
Jeff
03/05/2021, 2:47 PM
Hey @Lena Stepanova 🙂
Most of the time, this is a JDK related issue. I was initially using the embedded JDK. I solved it by changing the JDK at:
File -> Project Structure -> SDK Location -> JDK location
Let me know if this works for you 🙂
l
Lena Stepanova
03/05/2021, 4:36 PM
I have tried both options I have in JDK location, which are actually the same, still tried switching, but it didn't have any effect