title: Why does Room show me that AppDatabase_Impl does not exist error?
body: <blockquote>
    <p>01-17 14:25:21.567 5084-5084/? E/AndroidRuntime: FATAL EXCEPTION: main
                                                     Process: com.example.harv.swat, PID: 5084
                                                     java.lang.RuntimeException: Unable to start activity
    ComponentInfo{com.example.harv.swat/com.example.harv.swat.HomeActivity}:
    java.lang.RuntimeException: cannot find implementation for
    com.example.harv.swat.model.AppDatabase. AppDatabase_Impl does not
    exist
                                                         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2696)
                                                         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2757)
                                                         at android.app.ActivityThread.-wrap12(ActivityThread.java)
                                                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1504)
                                                         at android.os.Handler.dispatchMessage(Handler.java:102)
                                                         at android.os.Looper.loop(Looper.java:163)
                                                         at android.app.ActivityThread.main(ActivityThread.java:6237)
                                                         at java.lang.reflect.Method.invoke(Native Method)
                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:877)
                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
                                                      Caused by: java.lang.RuntimeException: cannot find implementation for
    com.example.harv.swat.model.AppDatabase. AppDatabase_Impl does not
    exist
                                                         at android.arch.persistence.room.Room.getGeneratedImplementation(Room.java:92)
                                                         at android.arch.persistence.room.RoomDatabase$Builder.build(RoomDatabase.java:454)
                                                         at com.example.harv.swat.model.Db.(Db.java:16)
                                                         at com.example.harv.swat.model.Db.getInstance(Db.java:20)
                                                         at com.example.harv.swat.HomeActivity.onCreate(HomeActivity.java:28)
                                                         at android.app.Activity.performCreate(Activity.java:6847)
                                                         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
                                                         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2649)
                                                         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2757) 
                                                         at android.app.ActivityThread.-wrap12(ActivityThread.java) 
                                                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1504) 
                                                         at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                         at android.os.Looper.loop(Looper.java:163) 
                                                         at android.app.ActivityThread.main(ActivityThread.java:6237) 
                                                         at java.lang.reflect.Method.invoke(Native Method) 
                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:877) 
                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)</p>
  </blockquote>
  
  <pre><code>public class Db {
  AppDatabase adb;
  private static Db db;
  
  private Db(Context context){
      adb = Room.databaseBuilder(context,
              AppDatabase.class, "swat").allowMainThreadQueries().build();
  }
  public static Db getInstance(Context context){
      if(db==null){
          db = new Db(context);
      }
      return db;
  }
  public MyDAO getDao(){
      return adb.userDao();
  }}
  </code></pre>
  
  <p><strong>DOA class</strong></p>
  
  <pre><code>@Dao
  public interface MyDAO {
  @Query("SELECT * FROM content")
  List&lt;Content&gt; getAll();
  
  @Query("SELECT * FROM content WHERE id IN (:userIds)")
  List&lt;Content&gt; loadAllByIds(int[] userIds);
  
  /*@Query("SELECT * FROM user WHERE first_name LIKE :first AND "
          + "last_name LIKE :last LIMIT 1")
  Content findByName(String first, String last);*/
  
  @Insert
  void insertAll(Content... users);
  
  @Delete
  void delete(Content user);}
  </code></pre>
  
  <p><strong>Gradle file</strong></p>
  
  <pre><code>dependencies {
  implementation fileTree(dir: 'libs', include: ['*.jar'])
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
  implementation 'com.android.support:appcompat-v7:26.1.0'
  implementation 'com.android.support.constraint:constraint-layout:1.0.2'
  testImplementation 'junit:junit:4.12'
  androidTestImplementation 'com.android.support.test:runner:1.0.1'
  androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
  
  // ViewModel and LiveData
  implementation "android.arch.lifecycle:extensions:1.0.0"
  implementation "android.arch.lifecycle:common-java8:1.0.0"
  //annotationProcessor "android.arch.lifecycle:compiler:1.0.0"
  
  // Room
  implementation "android.arch.persistence.room:runtime:1.0.0"
  annotationProcessor "android.arch.persistence.room:compiler:1.0.0"
  
  // Test helpers for Room
  testImplementation "android.arch.persistence.room:testing:1.0.0"
  }
  </code></pre>