編輯:關於 Android 開發
本文彙總了一批優秀的 Android 開發工具庫,涵蓋依賴注入、圖片緩存、網絡相關、數據庫 ORM、公共庫、版本兼容、多媒體、事件總線、傳感器、安全、插件化、文件處理等方面,便於開發者按需選型。

透過依賴注入減少 View、服務、資源的初始化與事件綁定等重複工作。
AndroidAnnotations:快速開發框架,支持 view、extras、系統服務、資源的依賴注入,簡單的線程模型,事件綁定,REST 客戶端等。它在編譯時生成子類,僅約 50kb,不影響運行時性能。項目地址:https://github.com/excilys/androidannotations
roboguice:透過註解減少代碼量,在運行時讀取註解進行反射,可能影響性能。項目地址:https://github.com/roboguice/roboguice
butterknife:利用註解快速完成 View 初始化。項目地址:https://github.com/JakeWharton/butterknife
Dagger:適用於 Android 和 Java 的依賴注入框架。項目地址:https://github.com/square/dagger
Android-Universal-Image-Loader:目前使用最廣泛的圖片緩存庫,支持主流圖片緩存絕大多數特性。項目地址:https://github.com/nostra13/Android-Universal-Image-Loader
picasso:Square 開源的圖片緩存庫,可自動檢測 adapter 重用並取消之前的下載,支持圖片變換、加載本地資源、設置占位資源及 debug 模式。項目地址:https://github.com/square/picasso
ImageCache:包含內存和 SD 卡緩存,支持預取新圖片、二級緩存、多種緩存算法(FIFO、LIFO、LRU、LFU 等 13 種)。項目地址:https://github.com/Trinea/AndroidCommon
Asynchronous Http Client for Android:Android 非同步 HTTP 請求,支持在 UI 線程外請求、文件斷點上傳、智能重試、gzip 壓縮、解析 JSON、持久化 Cookies。項目地址:https://github.com/loopj/android-async-http
android-query:非同步加載,用更少代碼完成加載。項目地址:https://github.com/androidquery/androidquery
Async Http Client:Java 非同步 HTTP 請求庫。項目地址:https://github.com/AsyncHttpClient/async-http-client
Ion:支持圖片、JSON、HTTP post 等非同步請求。項目地址:https://github.com/koush/ion
HttpCache:根據 cache-control、expires 緩存 HTTP 請求,支持同步與非同步請求。項目地址:https://github.com/Trinea/AndroidCommon
Http Request:實用的 HTTP 請求工具庫。項目地址:https://github.com/kevinsawicki/http-request
okhttp:Square 開源的 HTTP 工具類,支持 SPDY 協議、連接池、gzip 壓縮與 Response 緩存。項目地址:https://github.com/square/okhttp
Retrofit:Square 的 RESTful API 設計庫。項目地址:https://github.com/square/retrofit
RoboSpice:Android 非同步網絡請求工具,支持緩存、REST 等。項目地址:https://github.com/stephanenicolas/robospice
簡化建表、查詢、更新、插入、事務、索引等操作。
greenDAO:性能佳、API 簡單易用、內存與庫體積小的 SQLite ORM 工具。項目地址:https://github.com/greenrobot/greenDAO
ActiveAndroid:SQLite ORM 工具。項目地址:https://github.com/pardom/ActiveAndroid
Sprinkles:配合 Retrofit 能方便保存從伺服器獲取的數據。項目地址:https://github.com/emilsjolander/sprinkles
ormlite-android:項目地址:https://github.com/j256/ormlite-android
Schematic:根據 SQLite 生成 ContentProvider。項目地址:https://github.com/SimonVT/schematic
Guava:Google 基於 Java 1.6 的類庫擴展,包含 collections、caching、concurrency、I/O 等,讓 Java 代碼更優雅簡潔。項目地址:https://code.google.com/p/guava-libraries/
Volley:Google 提供的網絡通信庫,使網絡請求更簡單快速。項目地址:https://github.com/mcxiaoke/android-volley
AndroidCommon:包含緩存、公共 View、常用工具類的 Android 公共庫。項目地址:https://github.com/Trinea/AndroidCommon
shipfaster:整合 Dagger、Otto、Retrofit、Robolectric、Picasso、OkHttp,方便快速開發。項目地址:https://github.com/pyricau/shipfaster
CleanAndroidCode:整合 Dagger、Otto、AndroidAnnotations。項目地址:https://github.com/pyricau/CleanAndroidCode
xUtils:基於 Afinal,包含 DbUtils、ViewUtils、HttpUtils、BitmapUtils 四大模塊。項目地址:https://github.com/wyouflf/xUtils
Afinal:Android 的 IOC、ORM 框架,內置 FinalActivity、FinalBitmap、FinalDb、FinalHttp 四大模塊。項目地址:https://github.com/yangfuhai/afinal
ActionBarSherlock:為所有版本提供統一的 ActionBar,解決 4.0 以下的適配問題。項目地址:https://github.com/JakeWharton/ActionBarSherlock
Nine Old Androids:將 Android 3.0 的所有動畫 API 兼容到 1.0。項目地址:https://github.com/JakeWharton/NineOldAndroids
HoloEverywhere:將 Android 3.0 的 Holo 主題兼容到 2.1 以上。項目地址:https://github.com/Prototik/HoloEverywhere
SherlockNavigationDrawer:結合 NavigationDrawer 與 ActionbarSherlock。項目地址:https://github.com/tobykurien/SherlockNavigationDrawer
Notifications4EveryWhere:將 Android 4.1 的 Notification 兼容到 2.2 以上。項目地址:https://github.com/youxiachai/Notifications4EveryWhere
Android Switch Widget Backport:將 Switch 與 SwitchPreference 兼容到 2.1 以上。項目地址:https://github.com/BoD/android-switch-backport
android-datepicker:將 4.0 的 datepicker 兼容到 2.2 以上。項目地址:https://github.com/SimonVT/android-datepicker
GlowPadBackport:將 4.2 的 GlowPadView 向後適配到 API 4 以上。項目地址:https://github.com/frakbot/GlowPadBackport
cocos2d-x:跨平台 2D 遊戲框架,支持 Android、iOS、Linux、Windows 等。項目地址:https://github.com/cocos2d/cocos2d-x
Vitamio:Android 與 iOS 平台的全能多媒體開發框架,全面支持硬件解碼與 GPU 渲染,能流暢播放 720P/1080P 高清多種格式視頻。項目地址:https://github.com/yixia/VitamioBundle
PhotoProcessing:利用 NDK 處理圖片的庫,支持多種濾鏡特效。項目地址:https://github.com/lightbox/PhotoProcessing
Android StackBlur:圖片模糊效果工具類。項目地址:https://github.com/kikoso/android-stackblur
Bitmap Smart Clipping using OpenCV:圖片智能裁剪,保留重要部分。項目地址:https://github.com/beartung/tclip-android
Cropper:圖片局部剪切工具,可觸摸控制選擇區域或旋轉。項目地址:https://github.com/edmodo/cropper
android-crop:圖片裁剪 Activity。項目地址:https://github.com/jdamcd/android-crop
TileView:可分塊顯示大圖,支持 2D 拖動、雙擊、雙指縮放。項目地址:https://github.com/moagrius/TileView
BlurEffectForAndroidDesign:圖片模糊效果。項目地址:https://github.com/PomepuyN/BlurEffectForAndroidDesign
android-eye:PC 端網頁查看同一局域網內的手機攝像頭內容。項目地址:https://github.com/Teaonly/android-eye
libpng for Android:PNG 圖片的 JNI 庫。項目地址:https://github.com/julienr/libpng-android
android-gpuimage:基於 GPU 的圖片濾鏡。項目地址:https://github.com/CyberAgent/android-gpuimage
AndroidFaceCropper:圖片臉部自動識別並返回局部圖片。項目地址:https://github.com/lafosca/AndroidFaceCropper
Android Video Crop:利用 TextureView 播放和剪切視頻。項目地址:https://github.com/dmytrodanylyk/android-video-crop
svg-android:Android SVG 矢量圖形支持。項目地址:https://github.com/japgolly/svg-android
Android Visualizer:從 MediaPlayer 獲得音頻並展示音軌。項目地址:https://github.com/felixpalmer/android-visualizer
ExoPlayer:Google 開發的媒體播放庫,支持自適應回放、緩存持久化和自定義渲染器。項目地址:https://github.com/google/ExoPlayer
透過發布/訂閱事件解耦事件發送與接收,簡化組件之間的通信。
EventBus:greenrobot 開源項目,支持不同線程處理訂閱、事件優先級、粘性事件,性能優、體積小。項目地址:https://github.com/greenrobot/EventBus
Otto:Square 開源項目,基於 Guava 的 Android 優化。項目地址:https://github.com/square/otto
Great Android Sensing Toolkit:Android 感應器工具包,含示例及算法。項目地址:https://github.com/gast-lib/gast-lib
SensorManager:Android 傳感器管理。項目地址:https://github.com/nlathia/SensorManager
GPSLogger:記錄 GPS 信息。項目地址:https://github.com/mendhak/gpslogger
Pedometer:使用硬件計步感應器的計步器。項目地址:https://github.com/j4velin/Pedometer
leapcast:ChromeCast 模擬器 App。項目地址:https://github.com/dz0ny/leapcast
Arduino-Communicator:與 Arduino 通信的 App。項目地址:https://github.com/jeppsson/Arduino-Communicator
android-pedometer:Android 計步器。項目地址:https://github.com/bagilevi/android-pedometer
OwnTracks for Android:自己的軌跡記錄。項目地址:https://github.com/owntracks/android
Shake Detector library for Android:手機震動搖晃檢測庫。項目地址:https://github.com/tbouron/ShakeDetector
Android heart rate monitor:Android 心跳檢測。項目地址:https://github.com/phishman3579/android-heart-rate-monitor
Bluetooth LE Library for Android:藍牙信息庫。項目地址:https://github.com/alt236/Bluetooth-LE-Library---Android
farebot:透過 NFC 從公交卡讀取數據的應用。項目地址:https://github.com/codebutler/farebot

SQLCipher:SQLite 加密工具。項目地址:https://github.com/sqlcipher/sqlcipher
Conceal:快速高效地進行文件加解密。項目地址:https://github.com/facebook/conceal
Android-PasscodeLock:應用鎖,每次啟動需輸入四位數字密碼。項目地址:https://github.com/wordpress-mobile/Android-PasscodeLock
GlowPadBackport:將 4.2 的鎖屏界面解鎖擴展到 1.6 以上。項目地址:https://github.com/rock3r/GlowPadBackport
GlowPadView:Android 4 鎖屏界面解鎖。項目地址:https://github.com/nadavfima/GlowPadView
android-lockpattern:Android 圖案密碼解鎖。項目地址:https://code.google.com/p/android-lockpattern/
dynamic-load-apk:Android 動態加載 APK、熱部署。項目地址:https://github.com/singwhatiwanna/dynamic-load-apk
xCombine:Android App 插件式開發(插件需先安裝)。項目地址:https://github.com/wyouflf/xCombine
Android Plugin Framework:Android 插件式開發。項目地址:https://github.com/umeng/apf
對 PDF、Word、EPub、Html、Zip 等文檔類型的處理。
purePDF:允許從任何運行的 SWF 文件讀取和創建 PDF 文檔。項目地址:https://github.com/sephiroth74/purePDF
Office 365 SDK for Android Preview:支持 SharePoint Lists、SharePoint Files、Exchange 等。項目地址:https://github.com/OfficeDev/Office-365-SDK-for-Android
OpenSpritz-Android:EPub 閱讀器。項目地址:https://github.com/OnlyInAmerica/OpenSpritz-Android
jsoup:解析 HTML 的 Java 庫,可提取和操作數據、防止 XSS 攻擊。項目地址:https://github.com/jhy/jsoup
ZIP:Java 壓縮和解壓庫,支持遞歸操作、包含排除、重命名、遍歷等。項目地址:https://github.com/zeroturnaround/zt-zip
Salvage view:帶 View 緩存的 ViewPager PagerAdapter。項目地址:https://github.com/JakeWharton/salvage
Android Priority Job Queue:Android 後台任務隊列。項目地址:https://github.com/path/android-priority-jobqueue
Cobub Razor:開源的 mobile 行為分析系統。項目地址:https://github.com/cobub/razor
Countly:Android 移動端數據采集分析系統。項目地址:https://github.com/Countly/countly-sdk-android
aFileChooser:可內嵌到程序中的文件選擇器。項目地址:https://github.com/iPaulPro/aFileChooser
androidpn:基於 XMPP 協議的消息推送解決方案。項目地址:https://github.com/dannytiehui/androidpn
Bolts:Android 的異步編程模式,使用無大小限制的線程池,任務可組合可級聯。項目地址:https://github.com/BoltsFramework/Bolts-Android/
CastCompanionLibrary-android:使 Android 程序更快接入 Google Cast。項目地址:https://github.com/googlecast/CastCompanionLibrary-android
CastVideos-android:從 Android 設備透過 Google Cast 分享視頻。項目地址:https://github.com/googlecast/CastVideos-android
Uninstall_Statics:Android 應用自身被卸載監聽及打開瀏覽器等反饋功能實現。項目地址:https://github.com/sevenler/Uninstall_Statics
Memento:保證系統配置改變時 Activity 中某些數據簡單安全地保持不變。項目地址:https://github.com/mttkay/memento
FreeFlow:布局引擎,更簡單地創建自定義布局並提供過渡動畫。項目地址:https://github.com/Comcast/FreeFlow
Android Gesture Detectors Framework:Android 手勢框架,支持雙指旋轉、移動、平移、縮放。項目地址:https://github.com/Almeros/android-gesture-detectors
Mapbox Android SDK:Android Map 的替代版。項目地址:https://github.com/mapbox/mapbox-android-sdk
Activity animation:Activity 跳轉動畫,支持各方向波浪效果。項目地址:https://github.com/flavienlaurent/activityanimation
KryoNet:透過 NIO 提供客戶端和服務器端 TCP/UDP 網絡傳輸的 Java 庫。項目地址:https://github.com/EsotericSoftware/kryonet
Rebound:一個模仿彈簧反彈的 Java 庫,可用於創建動畫。項目地址:https://github.com/facebook/rebound
Android Social Networks:社交網絡接入統一管理器,可方便地從 Twitter、LinkedIn、Facebook、Google Plus 登陸與操作。項目地址:https://github.com/antonkrasov/AndroidSocialNetworks
Magnet:創建類似 Facebook 聊天桌面懸浮窗的效果。項目地址:https://github.com/premnirmal/Magnet
Parceler:透過註解及工具類自動完成實體類 Parcelable 及值傳遞。項目地址:https://github.com/johncarl81/parceler
AcDisplay:將 Android 的電話和通知集中到鎖屏顯示。項目地址:https://github.com/AChep/AcDisplay
菜鳥 Android 之路(上):從動機到踩過的那些坑
為什麼要學 Android 身為應屆畢業生,進社會前我做過很多夢,但現實還是把我打回原點。面對壓力與競爭,我問自己:第一步該做什麼?答案很樸素—— 先養活自己,才能走
Android 播放在線視頻的原理與注意事項
Android 播放在線視頻的原理與注意事項 要播放伺服器上的線上影片,做法是先把影片檔放到 Web 伺服器上。以本機為例,只要開啟電腦上的 Tomcat,將影片檔放進
用 CoordinatorLayout 實作 Toolbar 隨滾動收放的完整教學
用 CoordinatorLayout 打造 Toolbar 自動收放的捲動效果 在現代 Android 應用裡,讓頂部的 Toolbar 隨著內容向上滑動而隱藏、向下滑
Android App 代碼混淆實戰:從開啟、打包到錯誤還原
Android App 代碼混淆實戰:從開啟、打包到錯誤還原 接到現有專案的混淆需求時,最常遇到的問題不是「怎麼開啟」,而是「哪些類別不能混淆」。本文以一個實際案例說明