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

Đang mở
#8,718 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
22/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
android, java, kotlin, typescript
Lĩnh vực
cli, mobile

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
17.1k
Fork
1.3k
Merge trung bình
2 ngày 1 giờ
Pull request đã merge (30 ngày)
32

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ionic-team/capacitor

Tất cả issue của ionic-team/capacitor

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.