无法解析符号AppCompatActivity-无法识别支持v7库? [英] Cannot resolve symbol AppCompatActivity - Support v7 libraries aren't recognized?

查看:366
本文介绍了无法解析符号AppCompatActivity-无法识别支持v7库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图弄清楚为什么我的Android Studio无法正确识别AppCompat v7库.下面的import语句显示为灰色,并说没有support.v7.app的软件包.以下是我的活动文件:

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

我的build.grade:

My build.grade:

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"

我的项目设置:

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:

  • 清洁/重建项目
  • 使缓存无效并重新启动
  • 检查十亿次以确保我已安装支持库(我确实确实安装了最新的支持存储库和库)

有人知道任何修复程序吗?这花费了我很多时间,而且确实令人沮丧.

Anybody know of any fixes? It's cost me a lot of time and it's really frustrating.

推荐答案

好吧,我通过第四次进行./gradlew clean assemble的重建来对其进行了修复... Android Studio是一件奇怪的事情

Okay, I fixed it by rebuilding it for doing a ./gradlew clean assemble for the fourth time... Android Studio is a weird thing

这篇关于无法解析符号AppCompatActivity-无法识别支持v7库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆