This is a common error in the android studio and can be fixed by doing one of these – disabling Instant Run, clean project and rebuild project.
Most likely, this error will be gone by disabling instant run, here is how
How to disable instant run in android studio
In android studio, Click File > Settings Or Click Ctrl+Alt+S. In the next window, select Build,Execution,Deployment
Now you can disable the instant run and then try to rebuild your android project, it should build successful now