2

项目中有多个库。问题突然是我的库没有添加到对使用库至关重要的“Android 私有库”文件夹中。请帮我解决这个问题。工作区中只有一个项目会发生问题,其他项目运行良好。请注意:在 java 构建路径中 ---> 订购和导出 ---> 已检查私有库。所以这不能成为这个问题的问题。 在此处输入图像描述

我目前的 SDK 工具配置 在此处输入图像描述

Console message on cleaning:
[2013-08-24 18:03:33 - Twitter4jSample] Unable to resolve target 'android-7'
[2013-08-24 18:03:34 - myproject] Found 2 versions of android-support-v4.jar in the dependency list,
[2013-08-24 18:03:34 - myproject] but not all the versions are identical (check is based on SHA-1 only at this time).
[2013-08-24 18:03:34 - myproject] All versions of the libraries must be the same at this time.
[2013-08-24 18:03:34 - myproject] Versions found are:
[2013-08-24 18:03:34 - myproject] Path: D:\Project BackUps\project2 gen\dev\facebookSDK\libs\android-support-v4.jar
[2013-08-24 18:03:34 - myproject]   Length: 484258
[2013-08-24 18:03:34 - myproject]   SHA-1: bd6479f5dd592790607e0504e66e0f31c2b4d308
[2013-08-24 18:03:34 - myproject] Path: D:\Project BackUps\project2 gen\dev\projectAPP\libs\android-support-v4.jar
[2013-08-24 18:03:34 - myproject]   Length: 556198
[2013-08-24 18:03:34 - myproject]   SHA-1: 4a6be13368bb64c5a0b0460632d228a1a915f58f
[2013-08-24 18:03:34 - myproject] Jar mismatch! Fix your dependencies
[2013-08-24 18:03:34 - myproject] Found 2 versions of android-support-v4.jar in the dependency list,
[2013-08-24 18:03:34 - myproject] but not all the versions are identical (check is based on SHA-1 only at this time).
[2013-08-24 18:03:34 - myproject] All versions of the libraries must be the same at this time.
[2013-08-24 18:03:34 - myproject] Versions found are:
[2013-08-24 18:03:34 - myproject] Path: D:\Project BackUps\project2 gen\dev\facebookSDK\libs\android-support-v4.jar
[2013-08-24 18:03:34 - myproject]   Length: 484258
[2013-08-24 18:03:34 - myproject]   SHA-1: bd6479f5dd592790607e0504e66e0f31c2b4d308
[2013-08-24 18:03:34 - myproject] Path: D:\Project BackUps\project2 gen\dev\projectAPP\libs\android-support-v4.jar
[2013-08-24 18:03:34 - myproject]   Length: 556198
[2013-08-24 18:03:34 - myproject]   SHA-1: 4a6be13368bb64c5a0b0460632d228a1a915f58f
[2013-08-24 18:03:34 - myproject] Jar mismatch! Fix your dependencies
[2013-08-24 18:03:49 - myproject] Found 2 versions of android-support-v4.jar in the dependency list,
[2013-08-24 18:03:49 - myproject] but not all the versions are identical (check is based on SHA-1 only at this time).
[2013-08-24 18:03:49 - myproject] All versions of the libraries must be the same at this time.
[2013-08-24 18:03:49 - myproject] Versions found are:
[2013-08-24 18:03:49 - myproject] Path: D:\Project BackUps\project2 gen\dev\facebookSDK\libs\android-support-v4.jar
[2013-08-24 18:03:49 - myproject]   Length: 484258
[2013-08-24 18:03:49 - myproject]   SHA-1: bd6479f5dd592790607e0504e66e0f31c2b4d308
[2013-08-24 18:03:49 - myproject] Path: D:\Project BackUps\project2 gen\dev\projectAPP\libs\android-support-v4.jar
[2013-08-24 18:03:49 - myproject]   Length: 556198
[2013-08-24 18:03:49 - myproject]   SHA-1: 4a6be13368bb64c5a0b0460632d228a1a915f58f
[2013-08-24 18:03:49 - myproject] Jar mismatch! Fix your dependencies
[2013-08-24 18:04:07 - myproject] Found 2 versions of android-support-v4.jar in the dependency list,
[2013-08-24 18:04:07 - myproject] but not all the versions are identical (check is based on SHA-1 only at this time).
[2013-08-24 18:04:07 - myproject] All versions of the libraries must be the same at this time.
[2013-08-24 18:04:07 - myproject] Versions found are:
[2013-08-24 18:04:07 - myproject] Path: D:\Project BackUps\project2 gen\dev\facebookSDK\libs\android-support-v4.jar
[2013-08-24 18:04:07 - myproject]   Length: 484258
[2013-08-24 18:04:07 - myproject]   SHA-1: bd6479f5dd592790607e0504e66e0f31c2b4d308
[2013-08-24 18:04:07 - myproject] Path: D:\Project BackUps\project2 gen\dev\projectAPP\libs\android-support-v4.jar
[2013-08-24 18:04:07 - myproject]   Length: 556198
[2013-08-24 18:04:07 - myproject]   SHA-1: 4a6be13368bb64c5a0b0460632d228a1a915f58f
[2013-08-24 18:04:07 - myproject] Jar mismatch! Fix your dependencies
[2013-08-24 18:04:17 - myproject] Found 2 versions of android-support-v4.jar in the dependency list,
[2013-08-24 18:04:17 - myproject] but not all the versions are identical (check is based on SHA-1 only at this time).
[2013-08-24 18:04:17 - myproject] All versions of the libraries must be the same at this time.
[2013-08-24 18:04:17 - myproject] Versions found are:
[2013-08-24 18:04:17 - myproject] Path: D:\Project BackUps\project2 gen\dev\facebookSDK\libs\android-support-v4.jar
[2013-08-24 18:04:17 - myproject]   Length: 484258
[2013-08-24 18:04:17 - myproject]   SHA-1: bd6479f5dd592790607e0504e66e0f31c2b4d308
[2013-08-24 18:04:17 - myproject] Path: D:\Project BackUps\project2 gen\dev\projectAPP\libs\android-support-v4.jar
[2013-08-24 18:04:17 - myproject]   Length: 556198
[2013-08-24 18:04:17 - myproject]   SHA-1: 4a6be13368bb64c5a0b0460632d228a1a915f58f
[2013-08-24 18:04:17 - myproject] Jar mismatch! Fix your dependencies
4

3 回答 3

11

你对你的项目有不同support library added的看法:

Found 2 versions of android-support-v4.jar in the dependency list, but not all the versions are identical (check is based on SHA-1 only at this time).

这意味着您的项目和您正在使用的所有库中必须有相同版本的 jar。

要解决它,您可以删除项目中的android-support-v4.jar那个。在您可以在计算机中的某个地方选择一个 jar 之后(您可以选择 sdk 提供的那个),并且在将它粘贴到任何地方之后,您必须包含它。这为我解决了这个问题。

于 2013-08-24T13:06:13.553 回答
0

问题是我使用的 facebook SDK 也需要 android 支持 4 jar 并且在主项目中我还在我的项目中添加了支持 4 jar。所以发生了冲突。解决方案:从您的主项目中删除支持 jar 感谢您的时间

于 2013-08-24T13:08:37.643 回答
0

这也发生在我身上,我终于注意到在后台我打开了 SDK 管理器,等待输入我的代理凭据。一旦我关闭 SDK 管理器并重新启动 Eclipse,Android 私有库就会重新出现。

于 2014-08-05T16:49:24.153 回答