我对 android 有点陌生,我得到了一个应用程序代码,这是一个大项目。我理解所有编写的代码,但目前我遇到了问题。在我解释这个问题之前,我将列出这个应用程序正在使用的库。
- ActionBarSherLock
- 图像加载器
以下是 AndroidManifest 文件中 android 应用程序的应用程序设置
android:versionCode="7" android:versionName="2.0" > <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="18" />
我在项目属性的 Android 类别的应用程序中包含了这两个库。但是目前我收到以下错误
home cant be resolved
在整个项目中。在我收到此错误的地方,放置了以下相同的代码:
if(item.getItemId()==android.R.id.home){
并且 android.R.id.home 部分给出了错误。
编辑: 清理项目后,我在控制台中遇到了一些错误,如下所示:
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:22: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.TabBar'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:24: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabBar'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:26: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabBar.Inverse'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values\abs__styles.xml:101: error: Error: No resource found that matches the given name: attr 'android:textAllCaps'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:29: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.TabText'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:31: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabText'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:33: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabText.Inverse'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:55: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionMode.Inverse'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values\abs__styles.xml:328: error: Error: No resource found that matches the given name: attr 'android:textAllCaps'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:93: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Menu'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:96: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Title'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:98: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Title.Inverse'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:100: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Subtitle'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:102: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Subtitle.Inverse'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:104: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Title'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:106: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Title.Inverse'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:108: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Subtitle'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:110: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Subtitle.Inverse'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:113: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.PopupMenu'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:115: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.PopupMenu.Large'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:117: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.PopupMenu.Large'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:119: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.PopupMenu.Small'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__styles.xml:121: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.PopupMenu.Small'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__themes.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\ABS\res\values-v14\abs__themes.xml:14: error: Error: No resource found that matches the given name: attr 'android:actionBarWidgetTheme'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\Othaim\res\values-v11\styles.xml:3: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\Othaim\res\values-v11\styles.xml:5: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.TabBar'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\Othaim\res\values-v11\styles.xml:10: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar'.
[2013-09-10 16:04:30 - Othaim] D:\android\eclipse\Othaim\res\values\styles.xml:26: error: Error retrieving parent for item: No resource found that matches the given name 'android:style/Widget.Holo.ActionBar.TabView'.
ABS 是 ActionBarSherlock 库的项目。
我还检查了我的 java 文件,没有导入 android.R。我还阅读了有关堆栈交换的以下帖子:
R.id 无法在 android ListActivity 上解析
但他们都没有解决我的问题。
请在这个问题上帮助我。
谢谢