android - 在新工作区中构建 android 项目时出错

标签 android eclipse

是 android 开发的新手。我正在使用 eclipse 创建 android 项目。我尝试在新创建的工作区中使用Target SDK as API 21Compiled 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/1028256https://stackoverflow.com/a/24437408/1028256

Eclipse 中的新建项目向导似乎为 SDK 11 生成了文件,包括 appcompat-v7 的文件,因此您要么需要使用 API 21 进行编译,要么从项目中删除这些文件。

关于android - 在新工作区中构建 android 项目时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26624205/

相关文章:

java - 整个程序的记录器打印消息两次,有时甚至打印更多次

eclipse - svn checkout 和 checkin maven 多模块项目如何

java - 在 Java 中提取媒体属性或将 MediaInfo 安装到 Eclipse 中

android - Phonegap 的 IDE 是什么? Eclipse 够用吗?

android - 为什么 T::class.java 在 Kotlin 中是 Class<out Int>?

java - Android中用ListView显示矩形框

android - 如何计算android应用程序中两点之间的距离

android - 旋转手机在 Android 上重新启动视频

java - 如何从库中调用主程序中的类?

java - SWT PaintEvent从哪里来以及如何影响它