i did clear project and rebuild, i did invalidate cache and restart, i did remove .idea folder and all of these things did’t work for me.
2
Please check if your parent layout contains these lines or not!
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"
I was also getting this issue but I added the missing line from above and I resolved my issue. Please also check your layout file tags opening and proper closing. Thank you!
Please try to upgrade your gradle I faced the same issue, I resolved my issue by upgrading gradle plugin in project level build.gradle file from
classpath 'com.android.tools.build:gradle:7.0.1'
to
classpath 'com.android.tools.build:gradle:7.0.4'
Click here to cancel reply.
2
Answers
Please check if your parent layout contains these lines or not!
I was also getting this issue but I added the missing line from above and I resolved my issue. Please also check your layout file tags opening and proper closing. Thank you!
Please try to upgrade your gradle I faced the same issue, I resolved my issue by upgrading gradle plugin in project level build.gradle file from
to