Cannot resolve symbol AppCompatActivity – Support v7 libraries aren't recognized?
I’m trying to figure out why the heck my Android studio isn’t recognizing the AppCompat v7 library correctly. The import statement below shows up as gray and says there’s no package for support.v7.app. Below is my activity file:
import android.support.v7.app.AppCompatActivity; public class XApplicationActivity extends AppCompatActivity
compile "com.android.support:appcompat-v7:22.0.0" compile "com.android.support:support-annotations:$ANDROID_SUPPORT_VERSION" compile "com.android.support:support-v4:$ANDROID_SUPPORT_VERSION"
My project settings:
minSdkVersion = 14 targetSdkVersion = 21 compileSdkVersion = 21 buildToolsVersion = "22.0.1"
So I’m really confused as to why this is still giving me issues. Things I’ve tried already:
- Cleaning/rebuilding the project
- Invalidating caches and restarting
- Checking a billion times to make sure I have the support library installed (I absolutely do have the latest support repository and libraries installed)
Anybody know of any fixes? It’s cost me a lot of time and it’s really frustrating.
Okay, I fixed it by rebuilding it for doing a ./gradlew clean assemble for the fourth time… Android Studio is a weird thing
Answered By – hendersawn