通常網路上 例如 HitGub 都會有神人放已經寫好的套件

那要怎樣引用進Eclipse呢

 

以 Android-ViewPagerIndicator https://github.com/JakeWharton/Android-ViewPagerIndicator#readme

舉例來說

他的架構為

Android-ViewPagerIndicator-master

裡面有兩個資料夾

library

simple

這時候請打開Eclipse

 

  1. File->New->Other
  2. Select Android Project
  3. Select "Create Project from existing source"
  4. Click "Browse..." button and navigate to Android-ViewPagerIndicator-master
  5. Finish (Now Android-ViewPagerIndicator-master project in your workspace)
  6. Right-click on your project -> Properties
  7. In Android->Library section click Add
  8. select recently added project -> Ok
  9. that's it!

 

然後他就會有兩個專案在Eclipse裡

PS:路徑不能有中文

 

如果Eclipse裡的其他專案想用到library怎麼辦?

 

  • Right click the project you want to insert in.
  • Click Properties.
  • Select Java Build Path.
  • Select the Libraries tab.

 

 


,
創作者介紹

Mazs's Notes

cookiesp 發表在 痞客邦 PIXNET 留言(0) 人氣()