2012-03-22 7 views
13

Questa non è una domanda perché Ho già trovato la risposta.Controlli di dipendenza rigorosa Android in SDK 17

Il nuovo Android SDK 17 ha un controllo di dipendenza più severo sui file jar.

Allo stesso tempo, hanno aggiunto un barattolo che a mio avviso non c'era prima. Il mio progetto ha riscontrato un conflitto tra il nuovo annotations.jar nell'SDK e uno che ho già utilizzato. Sostituire l'uno con l'altro funzionerebbe, se hanno la stessa origine.

Il mio annotations.jar è da jetbrains, tramite una dipendenza Guice, quindi la sostituzione non funziona. Questo è l'errore che ho ricevuto:

[2012-03-22 10:54:27 - MyApp] Jar mismatch! Fix your dependencies 
[2012-03-22 10:54:46 - MyApp] Found 2 versions of annotations.jar in the dependency list, 
[2012-03-22 10:54:46 - MyApp] but not all the versions are identical (check is based on SHA-1 only at this time). 
[2012-03-22 10:54:46 - MyApp] All versions of the libraries must be the same at this time. 
[2012-03-22 10:54:46 - MyApp] Versions found are: 
[2012-03-22 10:54:46 - MyApp] Path: /opt/android-sdk-linux_x86/tools/support/annotations.jar 
[2012-03-22 10:54:46 - MyApp] Length: 1463 
[2012-03-22 10:54:46 - MyApp] SHA-1: 6f59fa3a223df6f332bee8b8bffb526f7445018b 
[2012-03-22 10:54:46 - MyApp] Path: /home/christine/workspace/MyApp/libs/annotations.jar 
[2012-03-22 10:54:46 - MyApp] Length: 7593 
[2012-03-22 10:54:46 - MyApp] SHA-1: e28fe9e70610beb9ef49226a9e56fed7a86e742a 
[2012-03-22 10:54:46 - MyApp] Jar mismatch! Fix your dependencies
+0

http://groups.google.com/group/actionbarsherlock/browse_thread/thread/b00f96062f61ea9e – Vivek

+0

Questo non è lo stesso problema ... – Christine

+0

@Christine HA risolto? –

risposta

2

Il mio annotations.jar è da jetbrains, tramite una dipendenza Guice. Ho rinominato questo file in jetbrains-annotation.jar che ha risolto il mio problema.