SDK 17中的Android严格依赖性检查

时间:2012-03-22 10:16:11

标签: android dependencies upgrade

这不是问题,因为我已经找到了答案

新的Android SDK 17对jar文件进行了更严格的依赖性检查。

与此同时,他们添加了一个我认为以前不存在的罐子。我的项目在SDK中的新annotations.jar和我已经使用过的{{1}}之间发生了冲突。如果它们具有相同的原点,那么将它们替换为另一个。

我的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

1 个答案:

答案 0 :(得分:2)

我的annotations.jar来自jetbrains,通过Guice依赖。我将此文件重命名为jetbrains-annotation.jar,它解决了我的问题。