Views getting flagged inside CardView

烂漫一生 提交于 2019-12-24 09:04:29

问题


Everything with my android studio was working fine until I came across this weird thing that when I add Views inside a CardViewthe IDE is warning me telling that for example "TextView is not allowed here". I have done this a thousand times before and It was absolutely fine.

Here is a List of the things I have tried
1. Restarted the IDE.
2. Restarted the entire system.
3. Tried the Invalidate Caches/Restart thing.
4. Cleaned the peoject.
5. Verified the support library version and files
6. Banged my head against the wall.

Nothing worked, here are some additional details

IDE version 1.3.1, SDK tools is using API 22 fully updated

And one more thing is suggestions are not shown under the CardView in XML, i guess both these problems are related.

I have seen a similar question here, but unfortunately it didn't help me.... Please someone find a fix for this problem...


回答1:


Well after spending a day searching around in the Intelli J IDEA docs, I was able to find a solution for this problem. It has to do with the corrupted project metadata and other project related data that is common across projects loaded into Android Studio, so naturally I just opened a backup of my project that I had backed up when the problem did not exist. And I solved it....

Hope this'll help you...



来源:https://stackoverflow.com/questions/32050016/views-getting-flagged-inside-cardview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!