未找到与给定名称匹配的资源'@android:style/Widget.Holo.ActionBar';。R不能解析为变量
首先我想说的是,我知道这个话题已经被提过很多次了。但我似乎找不到解决这个问题的办法 以下是日志中的一些错误:未找到与给定名称匹配的资源'@android:style/Widget.Holo.ActionBar';。R不能解析为变量,android,android-actionbar,android-theme,r.java-file,Android,Android Actionbar,Android Theme,R.java File,首先我想说的是,我知道这个话题已经被提过很多次了。但我似乎找不到解决这个问题的办法 以下是日志中的一些错误: /home/name/adt-bundle-linux-x86_64-20140702/sdk/extras/android/support/v7/appcompat/res/values-v14/themes_base.xml:159: error: Error: No resource found that matches the given name: attr 'android:
/home/name/adt-bundle-linux-x86_64-20140702/sdk/extras/android/support/v7/appcompat/res/values-v14/themes_base.xml:159: error: Error: No resource found that matches the given name: attr 'android:actionBarWidgetTheme'.
/home/name/workspace/Projectname/res/values-v14/styles.xml:4: error: Error: No resource found that matches the given name: attr 'android:actionBarStyle'.
/home/name/workspace/Projectname/res/values-v14/styles.xml:5: error: Error: No resource found that matches the given name: attr 'android:windowActionBar'.
/home/name/workspace/Projectname/res/values-v14/styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Widget.Holo.ActionBar'.
我制作了一个自定义主题,我使用Actionbar
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="9" />
所有这些都可以使用,然后我必须重新安装我的eclipse
,所以我将项目导入到新安装的项目中。这就是错误发生的时候。
R.File
也丢失
请帮帮我,因为这个问题我开始发疯了
编辑1:
把事情弄清楚。我使用此方法添加了android-support-v7-appcompat(使用资源添加库):
android-support-v7-appcompat
上的项目构建目标是android
4.0,我的项目构建目标是android
2.3.3
是这样吗?我不太确定它应该是什么样子。我不能确切地说,但如果您使用的是appcompt库 项目(右键单击)-->属性-->Android-->库节-->添加-->appcompt库 你能检查一下这个吗 编辑:
- 使用API级别14编译-当您使用SDK级别9编译应用程序时,编译器不知道错误日志中显示的元素
- 或项目(右键单击)-->Android工具-->添加支持库/修复项目属性