Не удалось выполнить задачу «:app:kspDebugKotlin». > Произошел сбой при выполнении ..GradleCompilerRunnerWithWorkers$GraAndroid

Форум для тех, кто программирует под Android
Ответить Пред. темаСлед. тема
Anonymous
 Не удалось выполнить задачу «:app:kspDebugKotlin». > Произошел сбой при выполнении ..GradleCompilerRunnerWithWorkers$Gra

Сообщение Anonymous »

Я пытался реализовать мобильное приложение, которое должно было использовать Dagger Hilt, Glide и Kapt. Однако, когда я попытался реализовать это, я получил ошибку, вызывающую ошибку [Hilt]. Для решения проблемы были предложения поменять в зависимостях Kapt на annotationProcessor. Я решил, что вместо Kapt рекомендуется использовать KSP. Но мне не удалось собрать проекты после изменения зависимостей, и я получаю упомянутую ошибку.

> Task :app:kspDebugKotlin FAILED
e: [ksp] No providers found in processor classpath.
e: Error occurred in KSP, check log for detail

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:kspDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Что я делаю не так?
Build.gradle на уровне проекта,
buildscript {
ext {
kotlin_version = '1.9.22'
}
dependencies {
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.40.1'
classpath 'com.google.gms:google-services:4.3.13'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22"

def nav_version = "2.5.0"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
}
repositories {
mavenCentral()
}
}

// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.0.2' apply false
id 'com.android.library' version '8.0.2' apply false
id 'org.jetbrains.kotlin.android' version '1.9.22' apply false
id 'com.google.devtools.ksp' version "1.9.22-1.0.17" apply false
}

Уровень модуля build.gradle такой же:
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'com.google.devtools.ksp'
id 'androidx.navigation.safeargs.kotlin'
id 'dagger.hilt.android.plugin'
id 'kotlin-parcelize'
id 'com.google.gms.google-services'
}

android {
namespace 'com.unitytests.virtumarttest'
compileSdk 33

defaultConfig {
applicationId "com.unitytests.virtumarttest"
minSdk 27
targetSdk 33
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}

buildFeatures{
viewBinding true
}
}

dependencies {

implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.core:core-ktx: 1.8.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

//apply plugin :"kotlin-kapt"

//loading button
implementation 'br.com.simplepass:loading-button-android:2.2.0'

//Glide
implementation 'com.github.bumptech.glide:glide:4.13.0'

//circular image
implementation 'de.hdodenhof:circleimageview:3.1.0'

//viewpager2 indicatior
implementation 'io.github.vejei.viewpagerindicator:viewpagerindicator:1.0.0-alpha.1'

//stepView
implementation 'com.shuhart.stepview:stepview:1.5.1'

//Android Ktx
implementation 'androidx.navigation:navigation-fragment-ktx:2.4.2'

//Dagger hilt
implementation "com.google.dagger:hilt-android:2.38.1"
ksp "com.google.dagger:hilt-compiler:2.38.1"

//Firebase
implementation 'com.google.firebase:firebase-auth:21.1.0'
}

В качестве дополнительного материала код файла build.gradle уровня проекта из руководства аналогичен приведенному ниже.
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-parcelize'
id 'androidx.navigation.safeargs.kotlin'
id 'dagger.hilt.android.plugin'
id 'com.google.gms.google-services'
}

android {
compileSdk 33

defaultConfig {
applicationId "com.example.kelineyt"
minSdk 27
targetSdk 33
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}

buildFeatures {
viewBinding true
}

}

dependencies {

implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

apply plugin :"kotlin-kapt"

//loading button
implementation 'br.com.simplepass:loading-button-android:2.2.0'

//Glide
implementation 'com.github.bumptech.glide:glide:4.13.0'

//circular image
implementation 'de.hdodenhof:circleimageview:3.1.0'

//viewpager2 indicatior
implementation 'io.github.vejei.viewpagerindicator:viewpagerindicator:1.0.0-alpha.1'

//stepView
implementation 'com.shuhart.stepview:stepview:1.5.1'

//Android Ktx
implementation 'androidx.navigation:navigation-fragment-ktx:2.4.2'

//Dagger hilt
implementation "com.google.dagger:hilt-android:2.38.1"
kapt "com.google.dagger:hilt-compiler:2.38.1"

//Firebase
implementation 'com.google.firebase:firebase-auth:21.0.6'

}

Уровень модуля build.gradle такой же, как
buildscript {
dependencies {
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.40.1'
classpath 'com.google.gms:google-services:4.3.13'

def nav_version = "2.5.0"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
}
}

plugins {
id 'com.android.application' version '7.3.0' apply false
id 'com.android.library' version '7.3.0' apply false
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
}

task clean(type: Delete) {
delete rootProject.buildDir
}


Подробнее здесь: https://stackoverflow.com/questions/779 ... while-exec
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Android»