I think we have to import the missing package either press Ctrl+Shift+o ( Cmd + Shift + O on Mac) or add import android.view.View; on top My problem solved
Workaround for the following error error: Error: No resource found that matches the given name (at 'hint' with value '@string/edit_message') Steps 1. Go to strings.xml file under res->values folder. 2. Add Enter a message and Save. 3. Run your program again.