I'm generating a click event in android and i used wrote the code in this way
public class LoginActivity extends AppCompatActivity {
Button btnLogin;
EditText inputEmail,inputPassword;
protected String enteredEmail;
String enteredPassword;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
// inputEmail = (EditText) findViewById(R.id.email);
// inputPassword = (EditText) findViewById(R.id.password);
btnLogin.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i = new Intent(getApplicationContext(), HomeActivity.class);
startActivity(i);
}});}
but getting the below error
TextInputLayout: EditText added is not a TextInputEditText. Please
> switch to using that class instead. 03-11 01:41:52.214
> 21936-21936/com.example.smartlayer.myhive_app I/TextInputLayout:
> EditText added is not a TextInputEditText. Please switch to using that
> class instead. 03-11 01:41:52.294
> 21936-21936/com.example.smartlayer.myhive_app D/AndroidRuntime:
> Shutting down VM 03-11 01:41:52.294
> 21936-21936/com.example.smartlayer.myhive_app W/dalvikvm: threadid=1:
> thread exiting with uncaught exception (group=0xb4ae3ba8) 03-11
> 01:41:52.334 21936-21936/com.example.smartlayer.myhive_app
> E/AndroidRuntime: FATAL EXCEPTION: main
> Process: com.example.smartlayer.myhive_app, PID: 21936
> java.lang.RuntimeException: Unable to start activity
How i solve this error ?