Questions tagged [kapt]

Use this tag for questions about the kapt (Kotlin Annotation Processing) compiler plugin for annotation processing with Kotlin.

From Kotlin reference:

Annotation processors (see JSR 269) are supported in Kotlin with the kapt compiler plugin.

Being short, you can use libraries such as Dagger or Data Binding in your Kotlin projects.

282 questions
0
votes
0 answers

Disable gradle build cache on spesific task or module

Our Android project has a module that generates codes using kapt. When we activate gradle build-cache and rebuild the project, the expected generated codes are not exist because the tasks to generate code are marked as "FROM CACHE". Can we disable…
aliftc12
  • 172
  • 10
0
votes
0 answers

Gradle build fails at :app:kaptDebugKotlin

when I'm trying to build and install my app I'm getting this error that don't says too much. I already tried to reverse changes to before the error but it's not helping. I changed nothing in room and hilt classes that I'm implementing and here are…
Arek Kubiński
  • 143
  • 1
  • 10
0
votes
0 answers

kapt/requery not generating ORM files

I'm trying to ressurect a kotlin app that used to Just Work™, i.e., compile straight away, on Ubuntu 16.04. Part of it is generated code, but i get compilation errors because there is, for instance, no PersonEntity class. So this code fails: public…
vesperto
  • 804
  • 1
  • 6
  • 26
0
votes
0 answers

A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution because of dagger-2 and kotlin kapt

Execution failed for task ':app:kaptSitPbcomDPDDebugKotlin'. > A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution > java.lang.reflect.InvocationTargetException (no error message) *…
0
votes
1 answer

Kotlin Annotation processor doesn't add import for generated files

I have an Annotation-processor, which should generate a class MyGeneratedClass containing a variable of another class MyEntity. My code inside the processfunction: val elementsWithAnnotation =…
0
votes
0 answers

Android Kotlin Proguard Obfuscation of Kotlin Default Impl

I use Android + Kotlin + Proguard Code inferface Authentication { val authenticated: Boolean val lastAuthentication: Instant fun authenticate(force: Boolean = false): Flow suspend fun revokeAccess() } And an implementation of that…
true-mt
  • 347
  • 3
  • 12
0
votes
1 answer

Using kapt in maven

I'm trying to make a small application for my asignment in kotlin using dagger and maven (can't switch to gradle) and I'm aware that for kotlin, i need to add not only dagger but also the kapt for it to work. Here is where my problem starts, it…
LordMoma
  • 1
  • 1
0
votes
2 answers

LocalDatabase_Impl does not exist

@Database(entities = [AepsBankTokenModel::class], version = 1) abstract class LocalDatabase : RoomDatabase() { abstract fun aepsBankTokenDao(): AepsBankTokenDao companion object { private var DATABASE_INSTANCE: LocalDatabase? = null …
0
votes
1 answer

Unable to parse XML - Kotlin

Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.res.ParseLibraryResourcesTask$ParseResourcesRunnable Other error codes FAILURE: Build…
spa
  • 11
  • 1
0
votes
1 answer

Room DB treating String @PrimaryKey as @Embedded

I am getting errors similar to below when I try to compile my project... error: Cannot find a column in the entity com.example.BooleanEntity that matches with this partial entity field. If you don't wish to use the field then you can annotate it…
Eric
  • 16,397
  • 8
  • 68
  • 76
0
votes
1 answer

Unable to build application with Room in my test App

When I try to build the app it gives me an error Execution failed for task ':app:kaptDebugKotlin'. > A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction >…
The DeMoN
  • 11
  • 2
0
votes
1 answer

Could not resolve all files for configuration `_classStructurekaptKotlin` caused by Execution failed for `StructureTransformAction`

Gradle multi-module project build fails with an unclear error. I run this command: gradle :module:processor:integrationTest (module:processor depends on module:processor-core, integrationTest is a custom Gradle task for running tests. I'm using…
naXa stands with Ukraine
  • 35,493
  • 19
  • 190
  • 259
0
votes
2 answers

Kotlin didn't compile and the kapt broke down

I try to run my tests and get the following error: Here is full code: https://gist.github.com/mnewlive/91b53af07b2b868e2b9b5968d7a24f0e
Morozov
  • 4,968
  • 6
  • 39
  • 70
0
votes
2 answers

I am getting an error in Kapt Debug Kotlin. I have update versions of dependencies in gradle file. still facing this issue

My app was running smoothly but I am getting this error now.I am getting an error in Kapt Debug Kotlin. I have update versions of dependencies in gradle file. still facing this issue. How it can be resolved? I saw somewhere to see your room database…
0
votes
1 answer

What does "Symbol" mean in KSP

Currently I am studying on KSP(Kotlin Symbol Processing), and I am curious about what does "Symbol" mean in KSP. When it comes to comparing with KAPT, it says "To run Java annotation processors unmodified, KAPT compiles Kotlin code into Java stubs…
Jagpaw
  • 75
  • 1
  • 5