The layout in layout has no declaration in the base layout folder [error]

前端 未结 22 2831
粉色の甜心
粉色の甜心 2021-01-31 13:05

After migrating to Android Studio 3.2, API 28, I am getting the following error on my app\'s layout:

The layout in layout has no declaration in the base lay

相关标签:
22条回答
  • 2021-01-31 13:26

    For me the following steps made it work:

    1. Cut all the code out of the page (ctrl+A+X for windows)
    2. Paste the code back.
    0 讨论(0)
  • 2021-01-31 13:29

    In my case it was the use of capital letters in the file name. I left everything in lowercase and it was fixed.

    0 讨论(0)
  • 2021-01-31 13:29

    In my case, this issue was caused by Uppercase letter. Wrong chars like "-" can also cause the issue. I changed the name from Activity_disease.xml to activity_disease.xml and the issue fixed.

    0 讨论(0)
  • 2021-01-31 13:32

    You can also try this :

    File => Invalidate Caches / Restart => Invalidate and Restart.

    0 讨论(0)
  • 2021-01-31 13:32

    Late to the party but My case is different from above.

    I just renamed the resource and it started working.

    Actually my resource name was ic_menu_black_24dp.xml so it was conflicting with the android's menu resource.

    0 讨论(0)
  • 2021-01-31 13:32

    (1) Delete the original layout.

    (2) Add the layout again.

    Step-1

    Step-2

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