2013-02-03 107 views
2

我下載了Facebook API 3.0,並將其導入Eclipse(Helion)。我創建了我的應用程序的新項目(稱爲HAN通信),並試圖添加爲庫FacebookSDK。但這個我看到了這個錯誤(或多個)後:導入時出錯FacebookSDK

[2013-02-03 11:28:06 - HANCommunication] Found 2 versions of android-support-v4.jar in the dependency list, 
[2013-02-03 11:28:06 - HANCommunication] but not all the versions are identical (check is based on SHA-1 only at this time). 
[2013-02-03 11:28:06 - HANCommunication] All versions of the libraries must be the same at this time. 
[2013-02-03 11:28:06 - HANCommunication] Versions found are: 
[2013-02-03 11:28:06 - HANCommunication] Path: D:\facebook-android-sdk-3.0\facebook-android-sdk-3.0\facebook\libs\android-support-v4.jar 
[2013-02-03 11:28:06 - HANCommunication] Length: 349252 
[2013-02-03 11:28:06 - HANCommunication] SHA-1: 612846c9857077a039b533718f72db3bc041d389 
[2013-02-03 11:28:06 - HANCommunication] Path: D:\workspace\space\HANCommunication\libs\android-support-v4.jar 
[2013-02-03 11:28:06 - HANCommunication] Length: 385685 
[2013-02-03 11:28:06 - HANCommunication] SHA-1: 48c94ae70fa65718b382098237806a5909bb096e 
[2013-02-03 11:28:06 - HANCommunication] Jar mismatch! Fix your dependencies 
[2013-02-03 11:29:17 - HANCommunication] Found 2 versions of android-support-v4.jar in the dependency list, 
[2013-02-03 11:29:17 - HANCommunication] but not all the versions are identical (check is based on SHA-1 only at this time). 
[2013-02-03 11:29:17 - HANCommunication] All versions of the libraries must be the same at this time. 
[2013-02-03 11:29:17 - HANCommunication] Versions found are: 
[2013-02-03 11:29:17 - HANCommunication] Path: D:\facebook-android-sdk-3.0\facebook-android-sdk-3.0\facebook\libs\android-support-v4.jar 
[2013-02-03 11:29:17 - HANCommunication] Length: 349252 
[2013-02-03 11:29:17 - HANCommunication] SHA-1: 612846c9857077a039b533718f72db3bc041d389 
[2013-02-03 11:29:17 - HANCommunication] Path: D:\workspace\space\HANCommunication\libs\android-support-v4.jar 
[2013-02-03 11:29:17 - HANCommunication] Length: 385685 
[2013-02-03 11:29:17 - HANCommunication] SHA-1: 48c94ae70fa65718b382098237806a5909bb096e 
[2013-02-03 11:29:17 - HANCommunication] Jar mismatch! Fix your dependencies 
[2013-02-03 11:34:45 - HANCommunication] Found 2 versions of android-support-v4.jar in the dependency list, 
[2013-02-03 11:34:45 - HANCommunication] but not all the versions are identical (check is based on SHA-1 only at this time). 
[2013-02-03 11:34:45 - HANCommunication] All versions of the libraries must be the same at this time. 
[2013-02-03 11:34:45 - HANCommunication] Versions found are: 
[2013-02-03 11:34:45 - HANCommunication] Path: D:\facebook-android-sdk-3.0\facebook-android-sdk-3.0\facebook\libs\android-support-v4.jar 
[2013-02-03 11:34:45 - HANCommunication] Length: 349252 
[2013-02-03 11:34:45 - HANCommunication] SHA-1: 612846c9857077a039b533718f72db3bc041d389 
[2013-02-03 11:34:45 - HANCommunication] Path: D:\workspace\space\HANCommunication\libs\android-support-v4.jar 
[2013-02-03 11:34:45 - HANCommunication] Length: 385685 
[2013-02-03 11:34:45 - HANCommunication] SHA-1: 48c94ae70fa65718b382098237806a5909bb096e 
[2013-02-03 11:34:45 - HANCommunication] Jar mismatch! Fix your dependencies 

我的清單:

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.radzik.hancommunication" 
    android:versionCode="1" 
    android:versionName="1.0" > 

    <uses-sdk 
     android:minSdkVersion="8" 
     android:targetSdkVersion="16" /> 

    <application 
     android:allowBackup="true" 
     android:icon="@drawable/ic_launcher" 
     android:label="@string/app_name" 
     android:theme="@style/AppTheme" > 
     <activity 
      android:name="com.radzik.hancommunication.MainActivity" 
      android:label="@string/app_name" > 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
    </application> 

</manifest> 

我試圖改變目標API的版本,但是這是沒有幫助我。

謝謝,

回答

3

檢查應用程序項目文件夾中的libs目錄。如果在那裏有一個android-support-v4.jar,這是錯誤的原因。 Facebook SDK已經包含了這個jar版本,顯然它們不匹配。我通過從我的應用程序項目中刪除了jar來解決了這個問題。

我懷疑造成這種不匹配的原因是,自從開發SDK之後,android SDK jar已經更新了。