2017-08-19 30 views
0

我得到在Android工作室在我的V24 /价值观v24.xml文件,该文件是在这里4个错误:错误检索父的项目:无资源发现在给定的名字相匹配

<?xml version="1.0" encoding="utf-8"?> 
<resources> 
<style name="Base.TextAppearance.AppCompat.Widget.Button.Borderless.Colored" parent="android:TextAppearance.Material.Widget.Button.Borderless.Colored"/> 
<style name="Base.TextAppearance.AppCompat.Widget.Button.Colored" parent="android:TextAppearance.Material.Widget.Button.Colored"/> 
<style name="TextAppearance.AppCompat.Notification.Info.Media"/> 
<style name="TextAppearance.AppCompat.Notification.Media"/> 
<style name="TextAppearance.AppCompat.Notification.Time.Media"/> 
<style name="TextAppearance.AppCompat.Notification.Title.Media"/> 

这里有四个错误:

Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'. 
Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'. 
Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'. 
Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'. 

不知道如何解决这个问题?这与我的targetSDKversion为23有什么关系?

回答

0

你下一步需要做:

File->Import (android-sdk\extras\android\support\v7). Choose "AppCompat" 

Project-> properties->Android. In the section library "Add" and choose "AppCompat" 

这就是全部!

检查答案here通过@Svyatoslav洛巴奇

+0

很抱歉,但你的意思是导入设置?这是我可以在'文件'下找到的唯一选项。 – appyhour

+0

该答案适用于Android Studio的较旧版本(2013),因此我无法找到该特定路径。在'support'文件夹中有一个名为appcompat-v7的文件夹,它有一些不同版本的appcompat文件,从18.0.0到26.0.0(这些版本中的每一个都有一个不同的'appcompact'文件在他们)。你知道我特别应该添加哪一个吗? – appyhour

相关问题