找不到与给定名称匹配的资源 'Theme.AppCompat.Light'。 Android工作室
No resource found that matches the given name 'Theme.AppCompat.Light'. Android Studio
我已经从 git 下载 Android Studio 项目,将其导入 Android Studio,但我无法 运行。我总是收到这个错误
Error:(7, -1) android-apt-compiler: [agent-stats-android] C:\Users\user\workspace\agent-stats-android\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
我尝试将这些文件添加到 libs 文件夹、SDK 的类路径和项目设置中的 "Libraries",但似乎没有任何效果...
android-support-v4.jar
android-support-v7-appcompat.jar
这不是 Gradle 项目,所以我不能使用这种方法 - https://developer.android.com/tools/support-library/setup.html#libs-with-res
您必须完全使用 "approach"。检查您在 "using android studio" 下提供的 link,在 "adding libraries with resources".
下
仅仅添加jar是不够的,还有appcompat v7的资源文件需要包含。
毕竟我从 Android Studio 切换到 Eclipse 并添加了此 link https://developer.android.com/tools/support-library/setup.html#libs-with-res 中描述的支持库。我与这种方法唯一不同的是,我必须将 Android SDK 的版本设置为 API21 而不是(默认)API19。
希望对大家有所帮助。
有非常相似的问题。
为我解决的是:
模块设置 -> Facets
然后选中相应模块上的 'library module' 复选框。 eclipse 的 'Library project' 属性 没有转移到 android studio
我已经从 git 下载 Android Studio 项目,将其导入 Android Studio,但我无法 运行。我总是收到这个错误
Error:(7, -1) android-apt-compiler: [agent-stats-android] C:\Users\user\workspace\agent-stats-android\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
我尝试将这些文件添加到 libs 文件夹、SDK 的类路径和项目设置中的 "Libraries",但似乎没有任何效果...
android-support-v4.jar
android-support-v7-appcompat.jar
这不是 Gradle 项目,所以我不能使用这种方法 - https://developer.android.com/tools/support-library/setup.html#libs-with-res
您必须完全使用 "approach"。检查您在 "using android studio" 下提供的 link,在 "adding libraries with resources".
下仅仅添加jar是不够的,还有appcompat v7的资源文件需要包含。
毕竟我从 Android Studio 切换到 Eclipse 并添加了此 link https://developer.android.com/tools/support-library/setup.html#libs-with-res 中描述的支持库。我与这种方法唯一不同的是,我必须将 Android SDK 的版本设置为 API21 而不是(默认)API19。
希望对大家有所帮助。
有非常相似的问题。
为我解决的是:
模块设置 -> Facets
然后选中相应模块上的 'library module' 复选框。 eclipse 的 'Library project' 属性 没有转移到 android studio