I have this xml file. If I compile it works fine, but if I go to see the preview it shows me this error:
I tried to look for this id but I couldn't find it anywhere. What is this @id/visible? How can I fix that? Thanks
I have this xml file. If I compile it works fine, but if I go to see the preview it shows me this error:
I tried to look for this id but I couldn't find it anywhere. What is this @id/visible? How can I fix that? Thanks
The error likely originated from android.support.design.widget.TextInputLayout
. If so, it (most likely) is a bug, and it has been filed in the Issue Tracker.
To test if android.support.design.widget.TextInputLayout
is the culprit, remove them from your layout and see if the error still persists.
If so, you may try to switch the API version in the editor to 19 or below, though you may see some minor differences in the design output. Or simply remove android.support.design.widget.TextInputLayout
until the issue has been solved.
This is not the solution but I have added these lines to dimens.xml:
<resources>
<item name="visible" type="id"/>
<item name="masked" type="id"/>
</resources>
The real reason for this is because you have a LinearLayout
inside of a ConstraintLayout
. Try to change all LinearLayouts
to Constrained ones and the problem will go away
try invalidating cache
File → Invalidate caches / Restart... → Just Restart.
You should set 1. android:id="@+id/visible" to android.support.design.widget.TextInputLayout and 2. android:id="@+id/masked" to child of TextInputLayout
just add two line cod in strings.xml file Then clean project `
<item name="visible" type="id"/>
<item name="masked" type="id"/>`
Because Android studio can not understand the type of attribute of some libraries like 'TextInputLayout ' And by doing this, we'll tell Android Studio that attribute visible is id type