我一直使用 Eclipse 编写 Android 并决定开始迁移到 Android Studio .我决定使用与 Eclipse 相同的 SDK,然后:
几秒钟后,Gradle 完成了构建,它在文件 Teste4\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'.
在文件->项目结构->模块:app(左栏)->属性选项卡下,我设置了以下版本:
我应该怎么做才能解决这个问题?
我已经尝试过 Stack Overflow 问题 appcompat-v7:21.0.0': No resource found that matches the given name: attr 'android:actionModeShareDrawable' 中的建议。 ,但是没有用。
最佳答案
您的编译 SDK 版本必须与支持库的主要版本匹配。
由于您使用的是版本 23 的支持库,因此您需要针对版本 23 的 Android SDK 进行编译。
或者,您可以通过切换到最新的支持库 v22 来继续针对 Android SDK 版本 22 进行编译。
关于android - 检索项目 : No resource found that matches the given name after upgrading to AppCompat v23 的父项时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32075498/