Lingviston Lingviston - 3 months ago 51
Android Question

Cannot resolve symbol 'AppCompatActivity'

I've just tried to use Android Studio. I've created blank project and tried to create

Activity
which extends
AppCompatActivity
. Unfortunalty Android Studio "says" that it


Cannot resolve symbol 'AppCompatActivity'


I have
compile "com.android.support:appcompat-v7:22.0.+"
in dependency list of my "app" module and rebuilt project several times. However I can only use
ActionBarActivity
. What am I doing wrong?

Answer

However I can only use ActionBarActivity.

Correct. For the appcompat-v7 library, that is the base class to use for your activities when you want to add an action bar.

What am I doing wrong?

Trying to use a class that doesn't exist. :-)