Android Studio layout Error : Unknown attribute

后端 未结 2 1850
故里飘歌
故里飘歌 2021-01-12 12:05

Android Studio Code Completion seems not working on xml and also it doesn\'t recognize any xml attribute except the attrs on Android support v7 views. Screenshot:

<

2条回答
  •  一整个雨季
    2021-01-12 12:25

    I had this issue for a while and tried all the "solutions" provided;

    • Sync Gradle files.
    • Invalidate cache.
    • Removed and re-add project.
    • Reinstall Android Studio.

    Nothing worked, until I came across this answer (by 4gus71n) which has worked for me every time this rather rare, but annoying issue has presented itself: https://stackoverflow.com/a/53160674/5692877

    In my case I;

    1. Closed Android Studio.
    2. Cleared the contents of the C:\Users\MyUsername\.AndroidStudio3.2\system\caches\ directory.
    3. Relaunched Android Studio.

    Worked a treat!

提交回复
热议问题