title: Compile errors while using room persistence library in a kotlin project
body: <p>I have been facing a problem for days now.
  I'm developing an app using Kotlin and room persistence library. My database consists of 4 entities. The problem is whenever I add 
  <code>kapt "android.arch.persistence.room:compiler:$room_version"</code> regardless of the room version I get the following compile errors and warnings: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>C:\Users\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-jre7\1.2.0\ec8b969e26fbcf2265a4d1a1539c4d1d4c5af380\kotlin-stdlib-jre7-1.2.0.jar: kotlin-stdlib-jre7 is deprecated. Please use kotlin-stdlib-jdk7 instead 
  
  C:\Users\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-jre8\1.2.0\505f55b9619bbc5f5e26c77427dd24a6a441eef1\kotlin-stdlib-jre8-1.2.0.jar: kotlin-stdlib-jre8 is deprecated. Please use kotlin-stdlib-jdk8 instead 
  
  C:\Users\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-jre7\1.2.0\ec8b969e26fbcf2265a4d1a1539c4d1d4c5af380\kotlin-stdlib-jre7-1.2.0.jar: kotlin-stdlib-jre7 is deprecated. Please use kotlin-stdlib-jdk7 instead 
  
  C:\Users\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-jre8\1.2.0\505f55b9619bbc5f5e26c77427dd24a6a441eef1\kotlin-stdlib-jre8-1.2.0.jar: kotlin-stdlib-jre8 is deprecated. Please use kotlin-stdlib-jdk8 instead 
  
  C:/Users/Desktop/Meals_App 
  app/build/tmp/kapt3/stubs/debug/appDatabase/appDao.java 
  error: cannot find symbol
      public abstract java.util.List&lt;appDatabase.recipesEntity&gt; getAll();
                                                ^
    symbol:   class recipesEntity
    location: class appDatabase 
  
  error: cannot find symbol
      appDatabase.recipesEntity recipes);
                 ^
    symbol:   class recipesEntity
    location: class appDatabase 
  
  error: cannot find symbol
      appDatabase.chefEntity chefs);
                 ^
    symbol:   class chefEntity
    location: class appDatabase 
  
  error: cannot find symbol
      appDatabase.recipesEntity recipes);
                 ^
    symbol:   class recipesEntity
    location: class appDatabase 
  app/build/tmp/kapt3/stubs/debug/appDatabase/appDatabase.java 
  
  error: cannot find symbol
      public abstract appDatabase.appDao appDao();
                                 ^
    symbol:   class appDao
    location: class appDatabase 
  
  error: cannot find symbol
  @android.arch.persistence.room.Database(entities = {appDatabase.recipesEntity.class, appDatabase.chefEntity.class, appDatabase.stepsEntity.class, appDatabase.ingredientEntity.class}, version = 1, exportSchema = false)
                                                                                                  ^
    symbol:   class chefEntity
    location: class appDatabase 
  
  error: cannot find symbol
  @android.arch.persistence.room.Database(entities = {appDatabase.recipesEntity.class, appDatabase.chefEntity.class, appDatabase.stepsEntity.class, appDatabase.ingredientEntity.class}, version = 1, exportSchema = false)
                                                                                                                                                               ^
    symbol:   class ingredientEntity
    location: class appDatabase 
  
  error: android.arch.persistence.room.RoomProcessor was unable to process this class because not all of its dependencies could be resolved. Check for compilation errors or a circular dependency with generated code.
  public abstract class appDatabase extends android.arch.persistence.room.RoomDatabase {
                  ^ 
  app/build/tmp/kapt3/stubs/debug/appDatabase/ingredientEntity.java 
  
  error: cannot find symbol
      public final appDatabase.ingredientEntity copy(int ingID, int recipeID, @org.jetbrains.annotations.NotNull()
                              ^
    symbol:   class ingredientEntity
    location: class appDatabase 
  app/build/tmp/kapt3/stubs/debug/appDatabase/stepsEntity.java 
  
  error: cannot find symbol
      public final appDatabase.stepsEntity copy(int stepID, int recipeID, @org.jetbrains.annotations.NotNull()
                              ^
    symbol:   class stepsEntity
    location: class appDatabase 
  app/build/tmp/kapt3/stubs/debug/appDatabase/recipesEntity.java 
  
  error: cannot find symbol
  @android.arch.persistence.room.Entity(tableName = "recipesEntity", foreignKeys = {@android.arch.persistence.room.ForeignKey(entity = appDatabase.chefEntity.class, childColumns = {"chefID"}, onDelete = 5, parentColumns = {"chefID"})})
                                                                                                                                                  ^
    symbol:   class chefEntity
    location: class appDatabase 
  
  error: android.arch.persistence.room.RoomProcessor was unable to process this class because not all of its dependencies could be resolved. Check for compilation errors or a circular dependency with generated code.
  public final class recipesEntity {
               ^ 
  app/build/tmp/kapt3/stubs/debug/appDatabase/chefEntity.java 
  
  error: android.arch.persistence.room.RoomProcessor was unable to process this class because not all of its dependencies could be resolved. Check for compilation errors or a circular dependency with generated code.
  public final class chefEntity {
               ^ </code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>Here are my database classes:</strong> 
  <strong>ChefEntity.kt</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>@Entity(tableName = "chefEntity", indices = [(Index(value = ("username"), unique = true))])
  
  data class chefEntity(
          @PrimaryKey(autoGenerate = true)
          @ColumnInfo(name = "chef_id")
          var chefID: Int,
  
          @ColumnInfo(name = "firstname")
          var firstname: String,
  
          @ColumnInfo(name = "lastname")
          var lastname: String,
  
          @ColumnInfo(name = "username")
          var username: String,
  
          @ColumnInfo(name = "password")
          var password: String,
  
          @ColumnInfo(name = "address")
          var address: String,
  
          @ColumnInfo(name = "mobile")
          var mobile: String,
  
          @ColumnInfo(name = "bg_color")
          var bg_color: Int
   )</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>recipesEntity.kt</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>@Entity(tableName = "recipesEntity",
          foreignKeys = [(ForeignKey(entity = chefEntity::class,
                  parentColumns = [("chefID")],
                  childColumns = [("chefID")],
                  onDelete = ForeignKey.CASCADE))])
  
  data class recipesEntity(
          @PrimaryKey(autoGenerate = true)
          @ColumnInfo(name = "recipeID")
          val recipeID: Int,
  
          @ColumnInfo(name = "chef_id")
          val chefID: Int,
  
          @ColumnInfo(name = "name")
          val name: String,
  
          @ColumnInfo(name = "prep_time")
          val pTime: String,
  
          @ColumnInfo(name = "image_name")
          val imageName: String
  )</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>ingredientEntity.kt</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>@Entity(tableName = "ingredientEntity",
          foreignKeys = [(ForeignKey(entity = recipesEntity::class,
                  parentColumns = [("recipeID")],
                  childColumns = [("recipeID")],
                  onDelete = ForeignKey.CASCADE))])
  
  data class ingredientEntity(
          @PrimaryKey(autoGenerate = true)
          @ColumnInfo(name = "ingredient_id")
          var ingID: Int,
  
          @ColumnInfo(name = "recipeID")
          var recipeID: Int,
  
          @ColumnInfo(name = "ingredient_name")
          var name: String
  )</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>stepsEntity.kt</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>@Entity(tableName = "stepsEntity",
          foreignKeys = [(ForeignKey(entity = recipesEntity::class,
                  parentColumns = [("recipeID")],
                  childColumns = [("recipeID")],
                  onDelete = ForeignKey.CASCADE))])
  
  data class stepsEntity(
          @PrimaryKey()
          @ColumnInfo(name = "step_id")
          val stepID: Int,
  
          @ColumnInfo(name = "recipeID")
          val recipeID: Int,
  
          @ColumnInfo(name = "desciption")
          val desciption: String,
  
          @ColumnInfo(name = "order")
          val order: Int
  )</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>appDatabase</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>@Database(entities = [(recipesEntity::class), (chefEntity::class), (stepsEntity::class), (ingredientEntity::class)],
          version = 1, exportSchema = false)
  
  abstract class appDatabase : RoomDatabase() {
      abstract fun appDao(): appDao
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>appDao</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>@Dao
  interface appDao {
  
      @Query("SELECT * from recipesEntity")
      fun getAll(): List&lt;recipesEntity&gt;
  
      @Insert(onConflict = OnConflictStrategy.REPLACE)
      fun insert(recipes: recipesEntity)
  
      @Insert(onConflict = OnConflictStrategy.REPLACE)
      fun insert(chefs: chefEntity)
  
      @Update
      fun update(recipes: recipesEntity)
  
      @Query("DELETE from recipesEntity")
      fun deleteAll()
  
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>Module:app</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>apply plugin: 'com.android.application'
  
  apply plugin: 'kotlin-android'
  
  apply plugin: "kotlin-kapt"
  
  apply plugin: 'kotlin-android-extensions'
  
  
  android {
      compileSdkVersion 27
      defaultConfig {
          applicationId "com.example.sawsan.mealsapp"
          minSdkVersion 17
          targetSdkVersion 27
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation 'com.android.tools.build:gradle:3.1.2'
      implementation "org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.41"
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
      implementation 'com.android.support:appcompat-v7:27.1.1'
      implementation 'com.android.support.constraint:constraint-layout:1.1.0'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
      implementation 'com.android.support:design:27.1.1'
      implementation 'com.android.support:appcompat-v7:27.1.1'
      implementation 'com.android.support.constraint:constraint-layout:1.1.0'
      implementation 'com.pes.materialcolorpicker:library:1.2.0'
      implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
      implementation 'com.afollestad.material-dialogs:commons:0.9.6.0'
  
      //Room
  
      def room_version = "1.1.1-rc1" // or, for latest rc, use "1.1.1-rc1"
  
      implementation "android.arch.persistence.room:runtime:$room_version"
      annotationProcessor "android.arch.persistence.room:compiler:$room_version"
      kapt "android.arch.persistence.room:compiler:$room_version"
  
      // Extensions = ViewModel + LiveData
      implementation "android.arch.lifecycle:extensions:1.1.1"
      kapt "android.arch.lifecycle:compiler:1.1.1"
  
      //RxJava support for Room
      implementation "android.arch.persistence.room:rxjava2:$room_version"
  
      //RxJava
      implementation "io.reactivex.rxjava2:rxkotlin:2.1.0"
      implementation "io.reactivex.rxjava2:rxjava:2.1.3"
      implementation "io.reactivex.rxjava2:rxandroid:2.0.1"
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>I hope someone can help me solve this problem since I couldn't find any similar case online.
  Sorry for taking so long, and thank you in advance.</p>