2012-03-22 42 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,它解决了我的问题。