For some time now (I can't remember which AS versi...
# android-studio
d
For some time now (I can't remember which AS version it was), the text editor is highlighting bits of code as "cannot access class" errors even though the code compiles just fine. So, gradle and the kotlin compiler are finding the classes, but AS isn't. Here's an example:
Cannot access class 'okio.BufferedSink'. Check your module classpath for missing or conflicting dependencies
Our build.gradle.kts file contains a reference to the dependency (okio in this example):
Copy code
implementation(libs.okio)
Invalidation of caches isn't helping either. Is anybody else experiencing this?
My AS info:
Copy code
Android Studio Giraffe | 2022.3.1 Patch 1
Build #AI-223.8836.35.2231.10671973, built on August 17, 2023
Runtime version: 17.0.6+0-17.0.6b829.9-10027231 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.5.2
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 10
Metal Rendering is ON
Registry:
    ide.intellij.laf.enable.animation=true
    external.system.auto.import.disabled=true
    debugger.new.tool.window.layout=true
    ide.text.editor.with.preview.show.floating.toolbar=false
    ide.instant.shutdown=false
    ide.experimental.ui=true
    ide.balloon.shadow.size=0

Non-Bundled Plugins:
    com.mroche.JsonHelper (1.2.0)
    com.github.copilot (1.2.22.3129)
    String Manipulation (9.11.3)
    Key Promoter X (2023.2.0)
    idea.plugin.protoeditor (223.8214.6)
    com.jetbrains.kmm (0.6.1(223)-18)
    org.jetbrains.compose.desktop.ide (1.5.1)
    mobi.hsz.idea.gitignore (4.4.4)
v
I've been having this same issue for months now. I've tried a whole bevy of ways to resolve this but to no avail. I just gave up at some point. Let me know if you figure out how to fix it
d
Yeah, it's been months and at least one patch release. It's quite annoying as I like to keep my projects free of warnings and definitely free of errors and this just always distracts me
v
same 🙃