【发布时间】:2015-11-12 13:50:14
【问题描述】:
在最近对 Android Studio 进行更新后,我们在编译以前工作的项目时遇到了问题。起初我们收到以下错误:
/Users/james/Development/AndroidProjects/myapp/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.0/res/values-v23/values-v23.xml
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
我将 gradle 文件中的 sdk 构建目标更新为 23,这使得这个特定问题消失了,但它给我们留下了大量 apache.http 包错误(特别是,我们用于 http 东西的大量 apache 包现在在 sdk 23 中消失了)。
我想做的是解决奇怪的资源错误,但没有更新到 sdk 23。我现在没有时间重新编写我们的工具库来使用任何新的 apache http 组件实现已发布.有人有什么想法吗?
【问题讨论】:
-
您在 appcompat_v7 res/values-v23/styles.xml 本身(而不是您的项目)中没有收到错误吗?
-
不确定我是否理解您的问题?我们在生成的文件中遇到了问题,如上面发布的错误中的文件路径所示。
-
如果生成的文件中出现错误,那么您必须在 gradle 中更新构建工具以匹配库版本。即 buildToolsVersion "23.0.1"