下載weibo_sdk_source_code_20120307.zip解壓後得到:
com_weibo_android_example
com_weibo_android
將這兩個文件夾導入到eclipse中後發現,一個時紅叉,一個是感嘆號,原因如下:
1:缺少default.propertiest文件
2:缺少android.jar文件
解決方法:
將project.propertiest文件重命名爲default.properties
然後就會自動出現android.jar
此時如果還有錯誤可以對選中的項目clean下,refresh下或是將eclipse restart下。
以上操作應該可以解決導入的問題,但com_weibo_android_example還是會出現紅叉,解決如下:
將com_weibo_android選中然後右鍵properties,再選android,勾選Is Library
將com_weibo_android_example的字符集改爲utf-8,然後右鍵properties,再選android,選add,選中com_weibo_android項目。
之後就可以只用com_weibo_android_example了,但是要記得修改key和scret哈