2013-03-08 84 views
7

你好我試圖整合Facebook在我的應用程序,以便爲我是從Integration guideFacebook在android中集成?

引導,但我在第3步中遇到錯誤,當我輸入,控制檯顯示像

[2013-03-08 10:16:07 - MessagesTask] Unable to resolve target 'android-8' 
[2013-03-08 10:17:00 - MessagesTask] Unable to resolve target 'android-8' 
[2013-03-08 15:57:54 - ProfilePictureSample] Unable to resolve target 'android-8' 
[2013-03-08 15:57:54 - BooleanOGSample] Unable to resolve target 'android-8' 
[2013-03-08 15:57:54 - Hackbook] Unable to resolve target 'android-8' 
[2013-03-08 15:57:55 - GraphApiSample] Unable to resolve target 'android-8' 
[2013-03-08 15:57:55 - Scrumptious] Unable to resolve target 'android-8' 
[2013-03-08 15:57:55 - PlacePickerSample] Unable to resolve target 'android-8' 
[2013-03-08 15:57:55 - SessionLoginSample] Unable to resolve target 'android-8' 
[2013-03-08 15:57:55 - FriendPickerSample] Unable to resolve target 'android-8' 
[2013-03-08 15:57:55 - HelloFacebookSample] Unable to resolve target 'android-8' 
[2013-03-08 15:57:55 - FacebookSDK] Unable to resolve target 'android-8' 
[2013-03-08 15:57:56 - SwitchUserSample] Unable to resolve target 'android-8' 
[2013-03-08 15:58:05 - ProfilePictureSample] WARNING: unable to write jarlist cache file C:\Users\gtm\facebook-android-sdk-3.0\samples\ProfilePictureSample\bin\jarlist.cache 
[2013-03-08 15:58:07 - FacebookSDK] Unable to resolve target 'android-8' 
[2013-03-08 15:58:07 - ProfilePictureSample] Unable to resolve target 'android-8' 
[2013-03-08 15:58:07 - BooleanOGSample] Unable to resolve target 'android-8' 
[2013-03-08 15:58:07 - Hackbook] Unable to resolve target 'android-8' 
[2013-03-08 15:58:07 - GraphApiSample] Unable to resolve target 'android-8' 
[2013-03-08 15:58:07 - Scrumptious] Unable to resolve target 'android-8' 
[2013-03-08 15:58:07 - PlacePickerSample] Unable to resolve target 'android-8' 
[2013-03-08 15:58:07 - SessionLoginSample] Unable to resolve target 'android-8' 
[2013-03-08 15:58:07 - FriendPickerSample] Unable to resolve target 'android-8' 
[2013-03-08 15:58:07 - HelloFacebookSample] Unable to resolve target 'android-8' 
[2013-03-08 15:58:07 - SwitchUserSample] Unable to resolve target 'android-8' 
[2013-03-08 15:58:07 - FacebookSDK] WARNING: unable to write jarlist cache file C:\Users\gtm\facebook-android-sdk-3.0\facebook\bin\jarlist.cache 
[2013-03-08 15:58:07 - ProfilePictureSample] WARNING: unable to write jarlist cache file C:\Users\gtm\facebook-android-sdk-3.0\samples\ProfilePictureSample\bin\jarlist.cache 
[2013-03-08 15:58:07 - BooleanOGSample] WARNING: unable to write jarlist cache file C:\Users\gtm\facebook-android-sdk-3.0\samples\BooleanOGSample\bin\jarlist.cache 
[2013-03-08 15:58:07 - Hackbook] WARNING: unable to write jarlist cache file C:\Users\gtm\facebook-android-sdk-3.0\samples\Hackbook\bin\jarlist.cache 
[2013-03-08 15:58:07 - GraphApiSample] WARNING: unable to write jarlist cache file C:\Users\gtm\facebook-android-sdk-3.0\samples\GraphApiSample\bin\jarlist.cache 
[2013-03-08 15:58:07 - Scrumptious] WARNING: unable to write jarlist cache file C:\Users\gtm\facebook-android-sdk-3.0\samples\Scrumptious\bin\jarlist.cache 
[2013-03-08 15:58:07 - PlacePickerSample] WARNING: unable to write jarlist cache file C:\Users\gtm\facebook-android-sdk-3.0\samples\PlacePickerSample\bin\jarlist.cache 
[2013-03-08 15:58:07 - SessionLoginSample] WARNING: unable to write jarlist cache file C:\Users\gtm\facebook-android-sdk-3.0\samples\SessionLoginSample\bin\jarlist.cache 
[2013-03-08 15:58:07 - FriendPickerSample] WARNING: unable to write jarlist cache file C:\Users\gtm\facebook-android-sdk-3.0\samples\FriendPickerSample\bin\jarlist.cache 
[2013-03-08 15:58:07 - HelloFacebookSample] WARNING: unable to write jarlist cache file C:\Users\gtm\facebook-android-sdk-3.0\samples\HelloFacebookSample\bin\jarlist.cache 
[2013-03-08 15:58:07 - SwitchUserSample] WARNING: unable to write jarlist cache file C:\Users\gtm\facebook-android-sdk-3.0\samples\SwitchUserSample\bin\jarlist.cache 

因此,一些錯誤可能你請幫我解決這個問題?

回答

20

這是因爲您的SDK中沒有API級別8。右鍵單擊該項目,然後選擇屬性> Android的&選擇其他可用的API

+0

如果我已經安裝並設置並構建目標,該怎麼辦?我已經添加並刪除了多次sdk,嘗試了不同的版本,新的工作區,不同的計算機......在這裏看到我的問題:http://stackoverflow.com/questions/22698925/unable-to-add-facebook-sdk-to -project – erdomester 2014-03-29 07:19:21

+0

作品lika一顆寶石... !!! tq ... – Sreekanth 2014-06-16 04:28:52

0

你只需要安裝API 8.

希望它的幫助!

+1

上午使用Api級別17 – 2013-03-08 10:53:27

+0

您可以發佈您的清單xml嗎?您是否嘗試過通過Android SDK Manager安裝Android 2.2 API 8?如果yu使用android 2.2 API 8導入了另一個項目,請檢查該項目的manisfest! – Rollyng 2013-03-08 12:18:30

+0

現在沒有問題..我只是重新啓動Eclipse,然後我修復了項目屬性的工作..感謝您的回覆 – 2013-03-09 07:51:20

0

只是添加此清單中

<uses-sdk 
     android:minSdkVersion="8" 
     android:targetSdkVersion="17" android:maxSdkVersion="17"/> 
+1

除非絕對必要,否則請不要設置maxSDKVersion(爲什麼要這樣做?) – erdomester 2014-03-29 07:21:09

3

打開的Android SDK管理器並安裝的Android 2.2(API 8)

2

如果未安裝API級別8,請使用Android SDK進行安裝。

如果已經安裝,請右鍵單擊項目。Properties> Android。選擇構建路徑爲Android 2.2(API級別8)