Android Studio layout Error : Unknown attribute

后端 未结 2 1851
故里飘歌
故里飘歌 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:07

    If you are Android Studio then go to tools and then Android then click on build with gradle, it will solve the error. I encountered it too.

    Tools->Android->Build with Gradle

    0 讨论(0)
  • 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!

    0 讨论(0)
提交回复
热议问题