Faced the same problem in Android Studio 3.1.3
Just go to style.xml file
and replace Theme name
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
with
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
Then clean and rebuild the project.This will solve the error.