title: Why "can't find android.support.design.widget.TextInputLayout"?
body: <p>My Android Studio version is 3.4 and my compileSdkVersion 29 &amp; buildToolsVersion "29.0.1".I want to use the TextInputLayout, but I got this error:
  Missing Classes:
  The following classes could not be found:
  - android.support.design.widget.TextInputLayout (Fix Build Path, Edit XML, Create Class)
   Tip: Try to build the project.</p>
  
  <p>I searched for days.I add this </p>
  
  <pre><code>implementation 'com.android.support:appcompat-v7:29.0.1'
  implementation 'com.android.support:design:29.0.1'
  </code></pre>
  
  <p>to my gradle file. but this error is still there.</p>
  
  <p>here is my xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;com.example.studentv3.tools.RoundImageView
          android:id="@+id/admin_layout_pic"
          android:layout_width="100dp"
          android:layout_height="100dp"
          android:layout_centerHorizontal="true"
          android:layout_marginTop="100dp"
          android:src="@drawable/admin_photo" /&gt;
  
      &lt;android.support.design.widget.TextInputLayout
          android:id="@+id/tt2"
          android:layout_below="@+id/admin_layout_pic"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
  
          &lt;EditText
              android:id="@+id/admin_login_activity_name_input"
              android:layout_width="match_parent"
              android:layout_height="50dp"
              android:layout_below="@+id/admin_layout_pic"
              android:layout_centerHorizontal="true"
              android:layout_marginLeft="50dp"
              android:layout_marginRight="50dp"
              android:layout_marginTop="20dp"
              android:background="@drawable/input_box"
              android:gravity="center"
              android:hint="请输入账户"
              android:maxLines="1"
              android:paddingLeft="@dimen/input_box_left_padding"
              android:textColor="@color/grey_text" /&gt;
  
      &lt;/android.support.design.widget.TextInputLayout&gt;
  
  
  
      &lt;android.support.design.widget.TextInputLayout
          android:id="@+id/tt3"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_below="@+id/tt2"&gt;
          &lt;EditText
              android:id="@+id/admin_login_activity_password_input"
              android:layout_width="match_parent"
              android:layout_height="50dp"
              android:layout_below="@+id/tt2"
              android:layout_centerHorizontal="true"
              android:layout_marginLeft="50dp"
              android:layout_marginRight="50dp"
              android:layout_marginTop="20dp"
              android:background="@drawable/input_box"
              android:gravity="center"
              android:hint="请输入密码"
              android:inputType="numberPassword"
              android:maxLines="1"
              android:paddingLeft="@dimen/input_box_left_padding"
              android:textColor="@color/grey_text" /&gt;
  
      &lt;/android.support.design.widget.TextInputLayout&gt;
  </code></pre>
  
  <p>here is my gradle:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 29
      buildToolsVersion "29.0.1"
      defaultConfig {
          applicationId "com.example.studentv3"
          minSdkVersion 15
          targetSdkVersion 29
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
      implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
      testImplementation 'junit:junit:4.13-beta-3'
      androidTestImplementation 'androidx.test:runner:1.3.0-alpha01'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha01'
      implementation 'com.android.support:appcompat-v7:29.0.1'
      implementation 'com.android.support:design:29.0.1'
      //api 'com.android.support:design:29.0.0'
      implementation 'com.google.android.material:material:1.0.0'
  }
  </code></pre>
  
  <p>there is no error in the java class of that xml , but i put it here:</p>
  
  <pre><code>package com.example.studentv3.activities;
  
  import android.app.Activity;
  import android.app.AlertDialog;
  import android.content.DialogInterface;
  import android.content.Intent;
  import android.database.Cursor;
  import android.database.sqlite.SQLiteDatabase;
  import android.os.Bundle;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.Window;
  import android.widget.Button;
  import android.widget.EditText;
  import android.widget.TextView;
  import android.widget.Toast;
  
  import com.example.studentv3.tools.myDatabaseHelper;
  import com.example.studentv3.R;
  
  
  
  public class admin_login_activity extends Activity {
      private EditText name;
      private EditText password;
      private Button login;
      private TextView register;
      private TextView forgetNum;
      private myDatabaseHelper dbHelper;
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          requestWindowFeature(Window.FEATURE_NO_TITLE);
          setContentView(R.layout.admin_login_layout);
  
          dbHelper = myDatabaseHelper.getInstance(this);
  
  
          name = (EditText) findViewById(R.id.admin_login_activity_name_input);
          password = (EditText) findViewById(R.id.admin_login_activity_password_input);
          login = (Button) findViewById(R.id.admin_login_activity_login);
          register = (TextView) findViewById(R.id.admin_login_activity_register);
          forgetNum = (TextView) findViewById(R.id.admin_login_activity_forgetNum);
  
  
          login.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
  
                  String nameInfo = name.getText().toString();
                  String passwordInfo = password.getText().toString();
  
                  SQLiteDatabase db = dbHelper.getWritableDatabase();
                  Cursor cursor = db.rawQuery("select password from admin where name=?", new String[]{nameInfo});
                  String pi = null;
                  if (cursor.moveToNext()) {
                      pi = cursor.getString(cursor.getColumnIndex("password"));
                  }
  
                  if (passwordInfo.equals(pi)) {
                      Intent intent = new Intent(admin_login_activity.this, admin_activity.class);
                      startActivity(intent);
                      cursor.close();
                  } else {
                      Toast.makeText(admin_login_activity.this, "用户名或密码错误", Toast.LENGTH_SHORT).show();
                  }
  
  
              }
          });
  
  
          register.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  AlertDialog.Builder builder = new AlertDialog.Builder(admin_login_activity.this);
                  LayoutInflater factory = LayoutInflater.from(admin_login_activity.this);
                  final View textEntryView = factory.inflate(R.layout.register, null);
                  builder.setTitle("用户注册");
                  builder.setView(textEntryView);
  
                  final EditText code = (EditText) textEntryView.findViewById(R.id.admin_register_info);
                  final EditText name = (EditText) textEntryView.findViewById(R.id.admin_register_name);
                  final EditText firstPassword = (EditText) textEntryView.findViewById(R.id.admin_register_first_password);
                  final EditText secondPassword = (EditText) textEntryView.findViewById(R.id.admin_register_second_password);
  
  
                  builder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
                      @Override
                      public void onClick(DialogInterface dialog, int which) {
  
                      }
                  });
  
                  builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
                      @Override
                      public void onClick(DialogInterface dialog, int which) {
                          String codeInfo = code.getText().toString();
  
                          if (codeInfo.equals("10086")) {
                              String nameInfo = name.getText().toString();
                              String firstPasswordInfo = firstPassword.getText().toString();
                              String secondPasswordInfo = secondPassword.getText().toString();
                              SQLiteDatabase db = dbHelper.getWritableDatabase();
  
                              if (firstPasswordInfo.matches("[0-9]{6}")) {
  
                                  if (firstPasswordInfo.equals(secondPasswordInfo)) {
                                      Cursor cursor = db.rawQuery("select name from admin where name=? ", new String[]{nameInfo});
  
                                      if (cursor.moveToNext()) {
                                          Toast.makeText(admin_login_activity.this, "该用户已存在", Toast.LENGTH_SHORT).show();
                                      } else {
                                          db.execSQL("insert into admin(name,password)values(?,?)", new String[]{nameInfo, firstPasswordInfo});
                                      }
                                  } else {
                                      Toast.makeText(admin_login_activity.this, "两次密码不相同", Toast.LENGTH_SHORT).show();
                                  }
                              } else {
                                  Toast.makeText(admin_login_activity.this, "密码为6位纯数字", Toast.LENGTH_SHORT).show();
                              }
  
  
                          } else {
                              Toast.makeText(admin_login_activity.this, "注册码错误", Toast.LENGTH_SHORT).show();
                          }
                      }
                  });
  
  
                  builder.create().show();
  
              }
          });
  
          forgetNum.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  Toast.makeText(admin_login_activity.this, "此功能暂不支持", Toast.LENGTH_SHORT).show();
              }
          });
  
      }
  }
  </code></pre>
  
  <p>this project can run and can be used on my phone(android 9) but when i enter the page that xml above controls , the app suddenly closed.I think the reason is that xml has this error:can't find android.support.design.widget.TextInputLayout .because i tried to delete all codes mentioned TextInputLayout, it won't closed, but it's not my expected results.</p>