Avatar ·

خطأ KaptExecution أثناء بناء مشروع Android باستخدام Kotlin: ماذا تفعل؟

مرحباً بالجميع! أنا مبتدئ في تطوير Android باستخدام Kotlin، وواجهت مشكلة أثناء بناء المشروع. أستخدم Android Studio، المشروع بلغة Kotlin مع Room و Dagger Hilt. عند تشغيل البناء (Build -> Make Project) أحصل على الخطأ التالي: ``` A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution ``` سجل الخطأ الكامل طويل، لكن في النهاية هناك شيء عن "java.lang.reflect.InvocationTargetException" و "no constructor for class ..." أو "cannot find symbol". إليك مثال على ملف `build.gradle.kts` (على مستوى التطبيق): ```kotlin plugins { id("com.android.application") id("org.jetbrains.kotlin.android") id("kotlin-kapt") } android { compileSdk = 34 defaultConfig { applicationId = "com.example.myapp" minSdk = 24 targetSdk = 34 } } dependencies { implementation("androidx.core:core-ktx:1.12.0") implementation("androidx.appcompat:appcompat:1.6.1") implementation("com.google.dagger:h