2012-02-25 10 views
31

Si uso ActionBarSherlock 3.5.1 todo está bien y funciona. Pero si quiero usar 4.0 RC1, tengo errores.
ActionBarSherlock 4.0 no funciona. Pero 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'. 

¿Alguna idea?

Respuesta

56

Asegúrese de ajustar el nivel de la API de destino (tanto del proyecto ActionBarSherlock y los suyos) a 15. Para ello:

  1. Cambio androide: targetSdkVersion a "15" en ambos archivos AndroidManifest.xml.
  2. Cambie el objetivo de compilación a "Android 4.0.3" (o una API de terceros equivalente) utilizando las Propiedades del proyecto (probablemente también tanto de ActionBarSherlock como de su proyecto).

No encontré documentación de este cambio, pero acabo de enterarme por el error de 'prueba'.

+0

La solución es correcta. Solvev por mi cuenta ayer. Pero gracias de cualquier manera. Pero no puedo responder mi propia pregunta :) – Leandros

+1

también si utilizo IntelliJ IDEA luego configuro los SDK de módulo a 4.0.3+ para el mismo efecto :) – Dori

+0

Lo entiendo después de seguir sus pasos: E/AndroidRuntime (1508): Causado por: java.lang.ClassNotFoundException: xxxx.XXXXActivity en el cargador dalvik.system.PathClassLoader [/mnt/asec/xxx.xxx-2/pkg.apk] –

5

Ajuste del de Java a nivel de cumplimiento (Proyecto> Propiedades) para 1,6 (en lugar de 1,5) hizo el trabajo para mí.

¡Cambiar el nivel de la API no funcionó!

0

Si utiliza misma

androide: "?" MinSdkVersion = android: targetSdkVersion = "?"

valora tanto su proyecto como el proyecto de la biblioteca que debe ser resuelto. Después de eso, no olvides cambiar android.target =? (MAX VALUE) en el archivo project.properties.

1

Haga clic derecho en la biblioteca -> Propiedades -> Android -> Establecer el destino de generación más reciente proyecto para

siguen el mismo para su proyecto.

Ahora limpie la biblioteca y el proyecto, esto debería resolver el problema.

Cuestiones relacionadas