TextInputLayout: RuntimeException - Failed to resolve attribute at index 24
<p>I keep on getting this error when I try to <code>setErrorEnabled</code> on my <code>textInputLayout</code> :</p>

<pre><code>03-12 12:29:03.206 5706-5706/? E/AndroidRuntime: FATAL EXCEPTION: main
                                                 Process: com.myapp, PID: 5706
                                                 java.lang.RuntimeException: Failed to resolve attribute at index 24
                                                     at android.content.res.TypedArray.getColor(TypedArray.java:401)
                                                     at android.widget.TextView.&lt;init&gt;(TextView.java:696)
                                                     at android.widget.TextView.&lt;init&gt;(TextView.java:632)
                                                     at android.widget.TextView.&lt;init&gt;(TextView.java:628)
                                                     at android.widget.TextView.&lt;init&gt;(TextView.java:624)
                                                     at android.support.design.widget.TextInputLayout.setErrorEnabled(TextInputLayout.java:380)
                                                     at com.bekwaai.popupwindow.RGNamePopUp$1.onClick(RGNamePopUp.java:48)
                                                     at android.view.View.performClick(View.java:4780)
                                                     at android.view.View$PerformClick.run(View.java:19866)
                                                     at android.os.Handler.handleCallback(Handler.java:739)
                                                     at android.os.Handler.dispatchMessage(Handler.java:95)
                                                     at android.os.Looper.loop(Looper.java:135)
                                                     at android.app.ActivityThread.main(ActivityThread.java:5254)
                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                     at java.lang.reflect.Method.invoke(Method.java:372)
                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
</code></pre>

<p>This is the scenario - I have a <code>textInputLayout</code> inside a <code>popupwindow</code>. This is the code inside the popupwidow.</p>

<pre><code>public class NamePopUp extends PopupWindow {

    android.support.v7.widget.AppCompatEditText name;
    TextInputLayout nameInput;


    public NamePopUp(final Context context) {
        super(context);
        View popupView = LayoutInflater.from(context).inflate(R.layout.popup_rg_confirm, null);
        nameInput = (TextInputLayout) popupView.findViewById(R.id.name_input_layout);
    }
}
</code></pre>

<p>This is my xml for the <code>popupwindow</code> layout:</p>

<pre><code>&lt;android.support.design.widget.TextInputLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="12dp"
    android:theme="@style/TextLabel"
    app:backgroundTint="@color/white"
    app:rippleColor="@color/white"
    android:id="@+id/name_input_layout"
    android:layout_marginBottom="8dp"
    android:paddingRight="24dp"
    android:paddingLeft="24dp"&gt;

&lt;android.support.v7.widget.AppCompatEditText
    android:id="@+id/enter_name"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:textColor="@color/white"
    android:textCursorDrawable="@drawable/color_cursor"
    android:hint="@string/groupname"/&gt;

&lt;/android.support.design.widget.TextInputLayout&gt;
</code></pre>

<p>This is the style I'm using:</p>

<pre><code>&lt;style name="TextLabel" parent="TextAppearance.AppCompat"&gt;
    &lt;!-- Hint color and label color in FALSE state --&gt;
    &lt;item name="android:textSize"&gt;20sp&lt;/item&gt;
    &lt;item name="android:textColorHint"&gt;@color/white&lt;/item&gt;
    &lt;!-- Label color in TRUE state and bar color FALSE and TRUE State --&gt;
    &lt;item name="colorAccent"&gt;@color/white&lt;/item&gt;
    &lt;item name="colorControlNormal"&gt;@color/white&lt;/item&gt;
    &lt;item name="colorControlActivated"&gt;@color/white&lt;/item&gt;
&lt;/style&gt;
</code></pre>

<p>The popupwindow is called inside a <code>android.support.v4.app.Fragment</code> and the fragment is inside a <code>AppCompatActivity</code>.</p>

<p>The error occurs here when the user clicks the ok button but the name <code>edittext</code> is blank. In other words, the user has not entered anything in the edittext and have clicked ok:</p>

<pre><code>    button_ok.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            if (StringUtils.isNotEmpty(name.getText().toString())) {
                nameInput.setErrorEnabled(false);
                groupNameEvent.doEvent(name.getText().toString());

            } else {
                nameInput.setErrorEnabled(true); //ERROR OCCURS HERE!
                nameInput.setError(context.getString(R.string.no_name));
            }
        }
    });
</code></pre>

<p>How do I get this error to disappear?</p>