I\'ve always programmed Android with Eclipse and decided to start migrating to Android Studio. I decided to use the same SDK I already had for Eclipse, then:
When you update your Android Studio, it uses API version 23 by default, which is the main reason of its occurrence. So,
At first, check your AppCompat version in build.gradle(Module:app) That is,
If after changing to 23 there occurs an error then just download
Compile Sdk Version to API 23, and Build Tools Version to 23.0.0
from SDK Manager. If already downloaded then:
1. Go to SDK Manager and
2. Under Project Structure, change *Compile SDK Version* to API 23, and *Build Tools Version* to 23.0.0
Click SDK Manager Button and open the dialog.
Click SDK Platform and check if Android 6.0 is downloaded or not.
if not, then download that first. After completing the download, click Apply.
Now you need to apply changes to your project from setting. Then press Ctrl + Alt + Shift + S to open setting
Don't forget to rebuild your project.
Then your error will be gone.