Skip to content

"Symbol is declared in unnamed module which is not read by current module" kotlin(JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE) #661

Description

@edechamps-Google

Steps to reproduce in VS Code with the Gradle and Kotlin extensions:

  1. Check out lysine-dev/okhttp@690d1df
  2. Open okhttp/src/commonJvmAndroid/kotlin/okhttp3/OkHttpClient.kt
  3. Wait for things to build and settle (approx. 3 minutes)

The problem:

OkHttpClient.kt has lots of spurious "Symbol is declared in unnamed module which is not read by current module kotlin(JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE)" diagnostics shown all over the place. This is despite Gradle building the entire project without any issues.

It looks like this error is showing up on every usage of a class from a dependency outside the project, including standard JDK Java classes and even Kotlin standard library classes.

Additional information:

  • Using JDK 17 in both Gradle and Kotlin extensions
  • VS Code 1.105.0
  • Gradle for Java extension version 3.17.2025090802
  • fwcd Kotlin extension version 0.2.36
  • fwcd LSP version 1.3.13 (auto-downloaded by the extension)

VS Code Kotlin output window log

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions