Always try this when you feel something is magically wrong with Android Studio. So, using the old-reliable File->Invalidate Caches/Restart did the trick. idea/libraries folder and noticed there's no appropriate metafile for the new version of the lib. One of the earlier videos about Android Studio explained this. It makes it super easy to add your imports. Even though Gradle ran without errors, the IDE itself kept sayingĬannot resolve symbol 'AppCompatActivity' (and it also wasn't available through the Ctrl+N search) If you are using Android Studio and you reference a class that requires an import statement, you can easily move your cursor to the class declaration, hit ALT+ENTER (Command+ENTER on MAC) and it will automatically import the class. In which ActionBarActivity is deprecated and empty and AppCompatActivty is the way to go, due to some glitch in Android Studio, It didn't quite pick up on version change. What am I doing wrong?Ī little addition to other answers here, for anyone having the same error while using the right lib version and the right class. However I can only use ActionBarActivity. I have compile ":appcompat-v7:22.0.+" in dependency list of my "app" module and rebuilt project several times. Unfortunalty Android Studio "says" that itĬannot resolve symbol 'AppCompatActivity' Possible solution for the above are Check the import statements at the top and make sure it includes the line: import Make sure both Activities are defined in your Manifest file. I've created blank project and tried to create Activity which extends AppCompatActivity. Tutorial how to zoom photo on ImageView in Android Studio 1.5. Cannot find symbol class Intent Android Previous Next This error may come when using Intent, and compiler throws above error.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |