2012-03-22 30 views
13

這不是問題,因爲我已經找到答案Android嚴格依賴於SDK 17的檢查

新的Android SDK 17對jar文件有更嚴格的依賴性檢查。

同時,他們添加了一個我認爲之前沒有的罐子。我的項目遇到了SDK中新的annotations.jar與我已經使用的之間的衝突。如果它們具有相同的原點,則由另一個替換即可。

我的annotations.jar來自jetbrains,通過Guice依賴關係,因此替換它不起作用。這是我得到的錯誤:

[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 2012-04-21 14:15:11

+0

這是不一樣的問題... – Christine 2012-06-06 22:12:29

+0

@Christine你解決了嗎? – 2012-07-05 11:26:53

回答

2

我的annotations.jar是來自jetbrains,通過Guice的依賴。我將這個文件改名爲jetbrains-annotation.jar,它解決了我的問題。