Room: Receiving error when using @Transaction : <p>I'm have a method annotated with @Transaction in my DAO class, which is causing the following error:</p>

<blockquote>
  <p>A DAO method can be annotated with only one of the following:Insert,Delete,Query,Update</p>
</blockquote>

<p>Here's my class:</p>

<pre><code>@Dao interface Dao {

    @Insert(onConflict = REPLACE) fun insertList(chacaras: List&lt;String&gt;)

    @Query("SELECT * FROM chacara WHERE cityId = :cityId")
    fun getListOfCity(cityId: String): LiveData&lt;List&lt;String&gt;&gt;

    @Delete fun deleteList(chacaraList: List&lt;String&gt;)

    @Transaction
    fun updateList(list: List&lt;String&gt;){
        deleteList(list)
        insertList(list)
    }

}
</code></pre>

<p>When I remove the method annotated with @Transaction it compiles normally.
Is there anyway to fix this?</p>
