I'm making ToDo application with Room Database. I got kaptDebugKotlin build error, so have been find what is cause. Now I find out but there's some problem. I made new project and copied the problem part(Room Database codes) to there. I saw database part's code makes Impl file(ToDoDatabase\_Impl.java etc.) automatically in test project and build well, but it doesn't make Impl in my main project and cannot build.

What is Impl file? and under what conditions is the Impl file automatically generated or not?

I changed every annotationProcessor to kapt.

My code is below.

**ToDoDao.kt**

```
package com.overeasy.hiptodo.model

import androidx.room.*

@Dao
interface ToDoDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insert(toDo: ToDo)

    @Update(onConflict = OnConflictStrategy.REPLACE)
    suspend fun update(toDo: ToDo)

    @Delete
    suspend fun delete(toDo: ToDo)
}

```

**ToDoDatabase.kt**

```
package com.overeasy.hiptodo.model

import android.content.Context
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase

@Database(
entities = [ToDo::class],
version = 1
)
abstract class ToDoDatabase : RoomDatabase() {
    abstract fun toDoDao(): ToDoDao

    companion object {
        @Volatile
        private var INSTANCE: ToDoDatabase? = null

        fun getInstance(context: Context) : ToDoDatabase? {
            if (INSTANCE == null) {
                synchronized(this) {
                    INSTANCE = Room.databaseBuilder(
                        context.applicationContext,
                        ToDoDatabase::class.java,
                        "todo_database"
                    ).build()
                }
            }
            return INSTANCE
        }
    }
}

```

**ToDo.kt**

```
package com.overeasy.hiptodo.model

import androidx.room.Entity
import androidx.room.Ignore
import androidx.room.PrimaryKey

@Entity
class ToDo {
    @PrimaryKey(autoGenerate = true)
    var id: Int? = null

    var something: String
    var date: Long?

    @Ignore
    var day: Long? = null

    constructor(something: String) {
        this.something = something
        this.date = null
    }

    constructor(something: String, date: Long) {
        this.something = something
        this.date = date
    }
}

```

**build.gradle (:app)**

```
plugins {
    id "com.android.application"
    id "kotlin-android"
    id "kotlin-kapt"
}

repositories {
    jcenter()
}

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.0"

    defaultConfig {
        applicationId "com.overeasy.hiptodo"
        minSdkVersion 16
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

        multiDexEnabled = true
        vectorDrawables.useSupportLibrary = true

        javaCompileOptions {
            annotationProcessorOptions {
                arguments += [
                        "room.schemaLocation":"$projectDir/schemas".toString(),
                        "room.incremental":"true",
                        "room.expandProjection":"true"]
            }
        }
    }

    buildFeatures {
        dataBinding true
    }

    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'
    }
}

    dependencies {
    def roomVersion = "2.2.5"

    implementation "org.jetbrains.kotlin:kotlin-stdlib:1.4.20"
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.20"
    implementation "androidx.core:core-ktx:1.3.2"
    implementation "androidx.appcompat:appcompat:1.2.0"
    implementation "androidx.constraintlayout:constraintlayout:2.0.4"
    implementation "androidx.cardview:cardview:1.0.0"
    implementation "androidx.recyclerview:recyclerview:1.1.0"
    implementation "com.google.android.material:material:1.2.1"
    implementation "androidx.multidex:multidex:2.0.1"
    implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
    implementation "io.reactivex.rxjava2:rxjava:2.2.19"
    implementation "io.reactivex.rxjava2:rxkotlin:2.4.0"
    implementation "io.reactivex.rxjava2:rxandroid:2.1.1"
    implementation "com.jakewharton.rxbinding4:rxbinding:4.0.0"
    implementation "com.jakewharton.rxbinding4:rxbinding-recyclerview:4.0.0"
    implementation "com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0"
    implementation "io.sentry:sentry-android:3.1.0"
    implementation "androidx.room:room-ktx:$roomVersion"
    kapt "androidx.room:room-compiler:$roomVersion"
    testImplementation "junit:junit:4.13.1"
    androidTestImplementation "androidx.test.ext:junit:1.1.2"
    androidTestImplementation "androidx.test.espresso:espresso-core:3.3.0"
}

```

This is terrible. I've been spent almost 2 weeks to solve this problem. But still can't.