Thread
#android-studio
    Jeff

    Jeff

    1 year ago
    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.
    Javier

    Javier

    1 year ago
    if same build works in another IDE, probably changing the JDK fixes the issue
    Jeff

    Jeff

    1 year ago
    I'm using the embedded JDK
    Javier

    Javier

    1 year ago
    try another to confirm, sample oracle JDK 8
    Jeff

    Jeff

    1 year ago
    Thanks @Javier It worked like a charm!
    Lena Stepanova

    Lena Stepanova

    1 year ago
    @Jeff Hi, I have the same issue after I upgraded to Canary 8, :gradle:tools.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
    Jeff

    Jeff

    1 year ago
    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 🙂
    Lena Stepanova

    Lena Stepanova

    1 year ago
    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