Android Studio 3.1 - Exception in plugin Android Support

I was having a similar issue. In my case Android Studio deleted all the "android:id"s from layout files.


I faced the exact same problem, I was afraid I broke something... I fixed it by cleaning and rebuilding the project (I had disabled instant run as suggested here before but I guess that was not necessary as I enabled it again after cleaning and rebuilding the project and worked just fine...).

Build -> Clean Project

Build -> Rebuild Project

I am not sure if rebuilding would be necessary, I did both steps and it worked fine, maybe just cleaning the project would have been sufficient.

Hope that helps!!

EDIT

Nice, one more thing. When I solved the problem depicted here I found another problem, when I clicked run the apk was not being created and I solved it with my answer on that other thread:

The APK file does not exist on disk


Disable "Instant Run" Work for me.

File>>Setting>>Build,Execution,Deployment>>Instant Run

Uncheck "Enable Instant Run......."