[android] recyclerview No adapter attached; skipping layout

My problem was my recycler view looked like this

        <android.support.v7.widget.RecyclerView
        android:id="@+id/chatview"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent">
    </android.support.v7.widget.RecyclerView>

When it should have looked like this

       <android.support.v7.widget.RecyclerView
        android:id="@+id/chatview"
        android:layout_width="395dp"
        android:layout_height="525dp"
        android:layout_marginTop="52dp"
        app:layout_constraintTop_toTopOf="parent"
        tools:layout_editor_absoluteX="8dp"></android.support.v7.widget.RecyclerView>
</android.support.constraint.ConstraintLayout>