These are chat archives for googlesamples/android-architecture

8th
Aug 2017
Jason Yeomans
@YeomansIII
Aug 08 2017 16:42
Oh no, no activity :(
I think Room is broken
The auto-generated DAO implementation is trying to return a variable _return that is never defined.

Simple dao method

  @Query("SELECT * FROM Channels")
  List<Channel> getChannels();

Auto-generated implementation

  @Override
  public List<Channel> getChannels() {
    final String _sql = "SELECT * FROM Channels";
    final RoomSQLiteQuery _statement = RoomSQLiteQuery.acquire(_sql, 0);
    final Cursor _cursor = __db.query(_statement);
    try {
      return _result;
    } finally {
      _cursor.close();
      _statement.release();
    }
  }
Jason Yeomans
@YeomansIII
Aug 08 2017 16:47
_result is never defined and therefor causes an error when trying to build the app
Jason Yeomans
@YeomansIII
Aug 08 2017 18:04
Got it working.,..
Was just missing some annotations and such in my entity files