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

オープン
#8,718 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
22/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
android, java, kotlin, typescript
領域
cli, mobile

調査の方向性

The report is that npx cap doctor flags a missing java directory under android/app/src/main/java on Kotlin-only layouts. Start from PR #8600, which the body says already contains a fix, and check whether it is still open or merged before writing anything. Reproduce by running npx cap doctor on an Android project that has only src/main/kotlin. Done when the doctor check accepts a Kotlin source layout without reporting the java directory error.

索引モデルが issue の本文から書いたものです。

説明

triage
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: https://github.com/ionic-team/capacitor/pull/8600

Additional Information

A fix for this issue has already been implemented and submitted in PR #8600:
https://github.com/ionic-team/capacitor/pull/8600

主要言語
TypeScript
スター
17.1k
フォーク
1.3k
平均マージ
2日 1時間
マージ済み PR(30日)
32

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ionic-team/capacitor のほかの issue

ionic-team/capacitor の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。