是 android 开发的新手。我正在使用 eclipse 创建 android 项目。我尝试在新创建的工作区中使用Target SDK as API 21 和Compiled with API 19 创建一个新示例。我已经安装了 API 19 和 20 的 SDK 及其所有更新。在尝试编译新创建的项目时,我遇到了以下错误。谁能帮我解决这个问题?
Description Resource Path Location Type
error: **Error retrieving parent for item: No resource found that matches the given name** '@android:TextAppearance.Material.SearchResult.Subtitle'. styles_base.xml /appcompat_v7/res/values-v21 line 168 Android AAPT Problem
Description Resource Path Location Type
error: Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Title'. styles_base.xml /appcompat_v7/res/values-v21 line 164 Android AAPT Problem
Description Resource Path Location Type
error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body1'. styles_base_text.xml /appcompat_v7/res/values-v21 line 38 Android AAPT Problem
error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body2'. styles_base_text.xml /appcompat_v7/res/values-v21 line 36 Android AAPT Problem
等等…… 我不知道出了什么问题。谁能指导我成功构建项目?
最佳答案
参见 http://code.google.com/p/android/issues/detail?id=72991#c8 :
Delete the values-v21 folder on app/src/main/res/, it is not important if you are not using android-L
以上是针对Android Studio的,对于Eclipse,它只是在项目根目录的res子文件夹中。
您也可以尝试使用 SDK 21 进行构建,如下所述:https://stackoverflow.com/a/26437523/1028256和 https://stackoverflow.com/a/24437408/1028256
Eclipse 中的新建项目向导似乎为 SDK 11 生成了文件,包括 appcompat-v7 的文件,因此您要么需要使用 API 21 进行编译,要么从项目中删除这些文件。
关于android - 在新工作区中构建 android 项目时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26624205/