Error in findViewById statement on Android

2

I'm new to Android and I'm having a hard time programming. This part of the code always has the error in R of findViewById . When putting the mouse on the error appears the information Cannot Revolve simble "R" , and just gives me options to create a variable, class with the name and etc.

@SuppressLint("WrongViewCast")
@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_cadastro);

        nome = (EditText) findViewById(R.id.edtNome);
        RE = (EditText) findViewById(R.id.edtRE);
        senha = (EditText) findViewById(R.id.edtSenha);

        button4 = (Button) findViewById(R.id.button4);


        button4.setOnClickListener(this);

    }
    
asked by anonymous 22.05.2018 / 19:09

1 answer

3

Your build.gradle probably should not be synchronized so just synchronize, you can also try Build - > Clean Project, or File - > Invalidate Caches / Restart ... - > Invalidate and Restart or Rebuild Project.

It's a boring bug that happens sometimes.

    
22.05.2018 / 19:47