2012-02-25 8 views
31

Se utilizzo ActionBarSherlock 3.5.1, tutto funziona correttamente. Ma se voglio usare 4.0 RC1 ho degli errori.
ActionBarSherlock 4.0 non funziona. Ma 3.5.1 do

[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values-v14/abs__styles.xml:6: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.Solid'. 
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values-v14/abs__styles.xml:10: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.Solid'. 
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values-v14/abs__styles.xml:12: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.Solid.Inverse'. 
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values-v14/abs__styles.xml:19: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabView.Inverse'. 
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/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'. 
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values/abs__styles.xml:101: error: Error: No resource found that matches the given name: attr 'android:textAllCaps'. 
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/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'. 
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/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'. 
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values/abs__styles.xml:244: error: Error: No resource found that matches the given name: attr 'android:textAllCaps'. 
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values-v14/abs__styles.xml:88: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Menu'. 
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/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.Title.Inverse'. 
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values-v14/abs__styles.xml:97: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Subtitle.Inverse'. 
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values-v14/abs__styles.xml:101: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Title.Inverse'. 
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values-v14/abs__styles.xml:105: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Subtitle.Inverse'. 
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/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'. 

Tutte le idee?

risposta

56

Assicurarsi di impostare il livello di API di destinazione (sia del progetto di ActionBarSherlock e il vostro) a 15. Per fare questo:

  1. Cambio Android: targetSdkVersion a "15" in entrambi i file AndroidManifest.xml.
  2. Modificare il target di build su "Android 4.0.3" (o un'API di terze parti equivalente) utilizzando le proprietà del progetto (probabilmente anche di ActionBarSherlock e del progetto).

Non ho trovato alcuna documentazione di questo cambiamento, ma ho appena scoperto per errore 'n'.

+0

La soluzione è giusta. Solvev da solo ieri. Ma grazie comunque. Ma non posso rispondere alla mia domanda :) – Leandros

+1

anche se si utilizza IntelliJ IDEA quindi impostare i moduli SDK su 4.0.3+ per lo stesso effetto :) – Dori

+0

Sto ricevendo questo dopo aver seguito i tuoi passi: E/AndroidRuntime (1508): Causato da: java.lang.ClassNotFoundException: xxxx.XXXXActivity nel loader dalvik.system.PathClassLoader [/mnt/asec/xxx.xxx-2/pkg.apk] –

5

Impostazione del Java-livello di conformità (Progetto> Proprietà) per 1.6 (invece di 1,5) ha fatto il lavoro per me.

La modifica del livello API non ha funzionato!

0

Se si utilizza lo stesso

Android: "?" MinSdkVersion = android: targetSdkVersion = "?"

valori sia del progetto che del progetto di biblioteca devono essere risolti. Dopo di allora non dimenticare di cambiare android.target =? (MAX VALUE) nel file project.properties.

1

Fare clic destro sulla libreria -> Proprietà -> Android -> fissato l'obiettivo del progetto di costruzione di ultima

seguono lo stesso per il vostro progetto.

Ora pulire sia la libreria che il progetto, questo dovrebbe risolvere il problema.

Problemi correlati