For me,
Even after upgrading to appcompat-v7:22.1.0, in which AppCompatActivty is added,
the problem was not resolved for me, Android Studio was giving same problem
Cannot resolve symbol ‘AppCompatActivity’
Sometimes clearing the android studio caches help.
In android studio I just cleared the caches and restarted with the following option–
File->Invalidate Caches/Restart