title: Android Room error: Dao class must be annotated with @Dao
body: <p>I'm using Room for my android app. I'm now trying to setup my database, but there is an error message, which says, that the Dao class must be annotated with @Dao. But as you can see in the coding snippet, the Dao class is annotated with @Dao. Does anyone know where the problem or my mistake could be? Both files aren't in the same folder (DAO is in the service folder while the other class is in the model folder)</p>
  
  <p>Device.java</p>
  
  <pre><code>@Entity(tableName = "device")
  public class Device {
  
      @PrimaryKey(autoGenerate = true)
      public int device_id;
  
      @ColumnInfo(name = "identifier")
      public String identifier;
  
      @ColumnInfo(name = "language")
      public int language;
  
      @ColumnInfo(name = "searchFilter")
      public int searchFilter;
  
      public Device(String identifier, int language, int searchFilter){
          this.identifier = identifier;
          this.language = language;
          this.searchFilter = searchFilter;
      }
  }
  </code></pre>
  
  <p>DeviceDAO.java</p>
  
  <pre><code>@Dao
  public interface DeviceDAO {
      @Insert(onConflict = OnConflictStrategy.REPLACE)
      void addDevicePreferences(DifficultType difficultType);
  
      @Query("SELECT * FROM device")
      List&lt;Device&gt; selectAllDevicePreferences();
  
      @Update(onConflict = OnConflictStrategy.REPLACE)
      void updateDevicePreferences(Device device);
  }
  </code></pre>