Skip to content

[Bug]: cap doctor fails to recognize valid Kotlin source directories #8718

Open

Description

@fabiomartino

Capacitor Version

@capacitor/cli: 8.x.x
@capacitor/core: 8.x.x
@capacitor/android: 8.x.x
@capacitor/ios: 8.x.x

[error] java directory is missing in android/app/src/main/java (when using a Kotlin-only source layout)

Other API Details

npm --version: 11.x.x (or latest)
node --version: v22.x.x / v24.x.x

Platforms Affected

  • iOS
  • Android
  • Web

Current Behavior

When running npx cap doctor on an Android project that uses Kotlin source directories (e.g., src/main/kotlin or custom Kotlin source sets instead of only src/main/java), the CLI fails to properly recognize or validate the source directory path, leading to incorrect diagnostic checks.

Expected Behavior

cap doctor should properly recognize and accept valid Kotlin source directories during Android project validation.

Project Reproduction

Provided directly via PR #8600: #8600

Additional Information

A fix for this issue has already been implemented and submitted in PR #8600:
#8600

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

    Type

    Fields

    Stage

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions