In Android Room Databse i am getting this Exception
Execution failed for task ':app:kaptDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
> java.lang.reflect.InvocationTargetException (no error message)
Here is My Entity class
@Entity(tableName = "tableName")
public class EntityName implements Serializable {
@PrimaryKey(autoGenerate = true)
private int userId;
}
Here is my Dao interface
@Dao
interface DaoName {
@get:Query("SELECT * FROM tableName")
val all: ArrayList<EntityName>
@Insert
fun insert(entiname: EntityName?):Long
@Delete
fun delete(entiname: EntityName?)
@Update
fun update(entiname: EntityName?)
}
I also had this issue in Room Database
Use
List<EntityName>
Instead of
ArrayList<EntityName>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.