Hi while trying to improve the build performance ...
# ksp
t
Hi while trying to improve the build performance of my current android application in android studio i have started seeing the following ksp errors
e: [ksp] Cannot use unbound generics in query functions. It must be bound to a type through base Dao class. - core.persistence.database.dao.AbstractDao.querySingle(androidx.sqlite.db.SupportSQLiteQuery)
e: [ksp] Cannot use unbound generics in query functions. It must be bound to a type through base Dao class. - core.persistence.database.dao.AbstractDao.querySingleOrNull(androidx.sqlite.db.SupportSQLiteQuery)
e: [ksp] Cannot use unbound generics in query functions. It must be bound to a type through base Dao class. - core.persistence.database.dao.AbstractDao.queryList(androidx.sqlite.db.SupportSQLiteQuery)
e: [ksp] Type of the parameter must be a class annotated with @Entity or a collection/array of it. - obj in core.persistence.database.dao.AbstractDao.save(TEntity)
e: [ksp] Type of the parameter must be a class annotated with @Entity or a collection/array of it. - obj in core.persistence.database.dao.AbstractDao.save(TEntity[])
e: [ksp] Type of the parameter must be a class annotated with @Entity or a collection/array of it. - obj in core.persistence.database.dao.AbstractDao.save(java.util.ArrayList<TEntity>)
e: [ksp] Type of the parameter must be a class annotated with @Entity or a collection/array of it. - obj in core.persistence.database.dao.AbstractDao.save(java.util.List<? extends TEntity>)
e: [ksp] Type of the parameter must be a class annotated with @Entity or a collection/array of it. - obj in core.persistence.database.dao.AbstractDao.saveAsync(TEntity[])
e: [ksp] Type of the parameter must be a class annotated with @Entity or a collection/array of it. - obj in core.persistence.database.dao.AbstractDao.saveAndReturnId(TEntity)
e: [ksp] Type of the parameter must be a class annotated with @Entity or a collection/array of it. - obj in core.persistence.database.dao.AbstractDao.saveAll(TEntity)
e: [ksp] Type of the parameter must be a class annotated with @Entity or a collection/array of it. - obj in core.persistence.database.dao.AbstractDao.saveAll(TEntity[])
e: [ksp] Type of the parameter must be a class annotated with @Entity or a collection/array of it. - obj in core.persistence.database.dao.AbstractDao.delete(TEntity)
e: [ksp] Type of the parameter must be a class annotated with @Entity or a collection/array of it. - obj in core.persistence.database.dao.AbstractDao.deleteAsync(TEntity)
e: [ksp] Type of the parameter must be a class annotated with @Entity or a collection/array of it. - obj in core.persistence.database.dao.AbstractDao.update(TEntity)
e: [ksp] Type of the parameter must be a class annotated with @Entity or a collection/array of it. - obj in core.persistence.database.dao.AbstractDao.updateAsync(TEntity)
My abstract DAO resembles this...
Copy code
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.RawQuery
import androidx.room.Transaction
import androidx.room.Update
import androidx.sqlite.db.SimpleSQLiteQuery
import androidx.sqlite.db.SupportSQLiteQuery
import core.persistence.database.entity.IEntity
import java.lang.reflect.ParameterizedType

typealias BaseDao<T> = AbstractDao<T, Long>
@Dao
abstract class AbstractDao<TEntity : IEntity<TKey?>, TKey : Any> : ITableAware {
    @Insert
    abstract fun save(obj: TEntity): Long

    @Insert
    abstract fun save(vararg obj: TEntity)

    @Insert
    abstract suspend fun saveAsync(vararg obj: TEntity)

...
...
my android studio version is
Android Studio Narwhal 3 Feature Drop | 2025.1.3
Build #AI-251.26094.121.2513.14007798, built on August 28, 2025
Runtime version: 21.0.7+-13880790-b1038.58 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
my gradle versions are as follows:-
# AGP and tools should be updated together
agp = "8.13.0"
androidTools = "31.13.0"
kotlin = "2.2.10"
ksp = "2.2.10-2.0.2"
requerySqliteAndroid = "3.49.0"
room = "2.7.2"
how can i fix this issues
c
I only get this in my GitHub CI pipeline (Ubuntu, Temurin JDK 21), but not when building locally (macOS, Android Studio Narwhal). Have no idea what is going on or how to solve it.
turns out this was a cache issue, you should probably remove
~/.gradle/
and try again
🙌 1