-1
            <ImageButton
                android:id="@+id/btnPostComment"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_alignParentRight="true"
                android:layout_centerInParent="true"
                android:background="@android:color/transparent"
                android:contentDescription="@string/app_name"
                android:paddingRight="8dp"
                android:scaleType="fitXY"
                android:onClick="@{(view)-> CommentListActivity.onPostComment()}"
                android:foreground="android:attr/selectableItemBackground"
                android:src="@drawable/ic_post_comment_96px" />

Screenshot

Unknown attribute android:layout , No auto suggestion in XML android

Joker
  • 616
  • 1
  • 6
  • 23

2 Answers2

0

to fix this you need synchronize your project with gradle file.you can do this by clicking the "synch project with gradle file" button on top right corner.or you can get help here https://stackoverflow.com/a/53160674/10687310

Raja Asif
  • 11
  • 3
0

It is very simple. Delete .caches file:

  1. Just close your AS.

  2. Go to .AndroidStudio3.2 folder.

  3. Delete the Caches file (path is: C:\ Users \ user \ .AndroidStudio4 \system)

  4. Restart your AS.

  5. Enjoy.