Android android.R.id.home cannot be resolved

I'm kind of new to android and I have application code which is a big project. I understand all the code written, but I am currently having a problem. Before I explain the problem, I listed the libs that this application uses.

  • ActionBarSherlock
  • Imageloader
  • Below are the settings of the Android app application in the AndroidManifest file

    android:versionCode="7"
    android:versionName="2.0" >  
    
    <uses-sdk
    android:minSdkVersion="9"
    android:targetSdkVersion="18" />
    

I included two libraries in the application from the Android category in the project properties. But at the same time, I got the following error:

home cant be resolved

throughout the project. In the places where I get this error, the same code is placed below:

if(item.getItemId()==android.R.id.home){

and the section android.R.id.home gives an error.

Edit: After cleaning up the project, I got some errors in the console, as shown below:

    [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 is a project for ActionBarSherlock lib.

java , android.R . :

API 10

R.id android ListActivity

R.id

.

, .

0
1

android.R.id.home API 11. , SDK 11 . , a static final , , API.

: ActionBarSherlock SDK 14 , faq:

, , Android 4.0 (API 14) .

, SDK (19 ). Android Lint, , , minSdkVersion.

+7

Source: https://habr.com/ru/post/1622584/


All Articles