天天看點

安卓優秀架構

1. Retrofit  

一句話介紹:Retrofit是一款類型安全的網絡架構,基于HTTP協定,服務于Android和java語言

上榜理由:Retrofit以21.8k的stars量雄踞github中android子标題榜首,第一當之無愧。

官網位址 http://square.github.io/retrofit/

github https://github.com/square/retrofit

作者:square團隊

使用:

compile 'com.squareup.retrofit2:retrofit:2.3.0'           
  • 1

2.okhttp

一句話介紹:okhttp是一款基于HTTP和HTTP2.0協定的網絡架構,服務于java和android用戶端

上榜理由,okhttp以20.4k的 stars量雄踞github中android子标題第二名。大型公司比如淘寶也封裝的是okhttp。Retrofit2.0開始内置okhttp框 架,Retrofit專注封裝接口完成業務需求,okhttp專注網絡請求的安全高效,筆者将兩者區分開,是想讓後來學習者知道,這是兩套架構,學習架構 原理時可以分開學習,以免了解混亂。

官網位址 http://square.github.io/okhttp/

github https://github.com/square/okhttp

作者:square團隊

使用:

compile 'com.squareup.okhttp3:okhttp:3.8.0'           
  • 1

   

3.Butter Knife

一句話介紹:Butter Knife所提供了一種能力——使用注解生成模闆代碼,将view與方法和參數綁定。

上榜理由:github上16.5K個 star,配合Androidstudio提供的Butter Knife插件,幫助開發者省卻了頻繁findviewbyid的煩惱,最新的Butter Knife還提供了onclick綁定以及字元串的初始化,初學者可以查閱Butter Knife以及Butter Knife插件進一步學習!

官網位址:http://jakewharton.github.io/butterknife/

github:https://github.com/JakeWharton/butterknife

作者:JakeWharton ,也是square團隊成員之一

使用:

dependencies {
  compile 'com.jakewharton:butterknife:8.6.0'
  annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
}           
  • 1
  • 2
  • 3
  • 4

4.MPAndroidChart

一句話介紹:MPAndroidChart是一款圖表架構

上榜理由:github上16.1K個star,以快速、簡潔。強大著稱的圖表架構

官網位址 https://github.com/PhilJay/MPAndroidChart

github https://github.com/PhilJay/MPAndroidChart

作者:PhilJay

使用:

在AS中加入Gradle依賴

    在根目錄的 build.gradle上加入:

    allprojects {
        repositories {
            maven { url "https://jitpack.io" }
        }
    }           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
在app的build.gradle上加入:

    dependencies {
        compile 'com.github.PhilJay:MPAndroidChart:v3.0.2'
    }           
  • 1
  • 2
  • 3
  • 4
  • 5

  

5. glide

一句話介紹:glide是一款專注于提供流暢劃動能力的“圖檔加載和緩存架構”

上榜理由:15.9k個star,圖檔加載類架構排名第一的架構,google 在2014開發者大會上示範的camera app就是基于gilde架構開發的

github https://github.com/bumptech/glide

作者 Bump Technologies團隊

使用:

repositories {
  mavenCentral()
  google()
}

dependencies {
  implementation 'com.github.bumptech.glide:glide:4.5.0'
  annotationProcessor 'com.github.bumptech.glide:compiler:4.5.0'
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

6.leakcanary

一句話介紹:一款記憶體檢測架構,服務于java和android用戶端

上榜理由:友善,簡潔是leakcanary最大的特點,隻需在應用的apllication中內建,就可以直接使用它;15.5k個star說明了它有多麼受歡迎

github https://github.com/square/leakcanary

作者 square團隊

使用:

dependencies {
   debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'
   releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
   testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
 }           
  • 1
  • 2
  • 3
  • 4
  • 5
在 Application 中寫入:


public class ExampleApplication extends Application {

  @Override public void onCreate() {
    super.onCreate();
    if (LeakCanary.isInAnalyzerProcess(this)) {
      // This process is dedicated to LeakCanary for heap analysis.
      // You should not init your app in this process.
      return;
    }
    LeakCanary.install(this);
    // Normal app init code...
  }
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16

7.Android-Universal-Image-Loader

一句話介紹:曾經的圖檔加載架構王者,android開發老手都用過它

上榜理由:android端圖檔加載架構的老 大哥了,15.3k個star足以證明它的熱門,UIL與gilde最大差別是可定制,UIL提供了大量配置方式,圖檔加載狀态的回調(成功,失敗,進行 中),加載動畫等;以及提供了移動端圖檔加載架構的緩存思路:三級緩存政策 sd卡-記憶體-網絡;值得注意的是,UIL以及兩年未更新了,但筆者仍推薦各位使用!

github https://github.com/nostra13/Android-Universal-Image-Loader

作者 nostra13

使用:

下載下傳位址  universal-image-loader-.jar           
  • 1

8.EventBus

一句話介紹:EventBus是一款本地元件間通信架構

上榜理由:元件間通信架構star量第 一:14.8k,在大型項目的Activities,fragments,Threads,Services都可以看到它的使用場景,盡管 EventBus在向未建立的元件傳遞事件時有些局限,僅适合在“活着的”元件間傳遞消息,但仍不妨礙它活躍在各個大型項目各個場景裡。

官網位址 http://greenrobot.org/eventbus/documentation/how-to-get-started/

github https://github.com/greenrobot/EventBus

作者 greenrobot

使用:

compile 'org.greenrobot:eventbus:3.0.0'           
  • 1

9.zxing

一句話介紹:條碼圖像處理庫

上榜理由:如果你用過二維碼,你肯定已經間接使用過大名鼎鼎的zxing了。13.9K的star量,讓它排在本榜單第九,實至名歸,如果你有了解二維碼的需求,不妨從了解、修改它源碼入手。

github https://github.com/zxing/zxing

作者 Sean Owen

10.picasso

一句話介紹:強力的圖檔下載下傳、緩存架構

上榜理由:本榜單出現的第三款圖檔類架構,不同的是picasso更強調圖檔下載下傳,你可以将picasso內建進你的項目中,你也可以結合gilde和UIL與picasso,三者一齊封裝至你的項目中,按需所用。

官網位址 http://square.github.io/picasso/

github https://github.com/square/picasso

作者 square團隊

使用:

compile 'com.squareup.picasso:picasso:2.5.2'           
  • 1

11.lottie-android

一句話介紹:一款可以在Android端快速展示Adobe Afeter Effect(AE)工具所作動畫的架構

上榜理由:動畫類架構第一名,github上 13.3k個star證明了他的優越性,利用json檔案快速實作動畫效果是它最大的便利,而這個json檔案也是由Adobe提供的After Effects(AE)工具制作的,在AE中裝一個Bodymovin的插件,使用這個插件最終将動畫效果生成json檔案,這個json檔案即可由 LottieAnimationView解析并生成絢麗的動畫效果。而且它還支援跨平台喲。

github https://github.com/airbnb/lottie-android

作者:Airbnb 團隊

12.fresco

一句話介紹:一款可以管理圖檔記憶體的架構

上榜理由:github上12.8k個star,圖檔類排行榜第四名,facebook的出身證明了它并非是重複造的輪子,在管理圖檔記憶體領域上有着它的一片天地,漸進式加載、加載gif都是它與前三位相比獨有的特性

官網位址: https://www.fresco-cn.org/

github https://github.com/facebook/fresco

作者 facebook

使用:

dependencies {
  // 其他依賴
  compile 'com.facebook.fresco:fresco:0.12.0'
}           
  • 1
  • 2
  • 3
  • 4
下面的依賴需要根據需求添加:


dependencies {
  // 在 API < 14 上的機器支援 WebP 時,需要添加
  compile 'com.facebook.fresco:animated-base-support:0.12.0'

  // 支援 GIF 動圖,需要添加
  compile 'com.facebook.fresco:animated-gif:0.12.0'

  // 支援 WebP (靜态圖+動圖),需要添加
  compile 'com.facebook.fresco:animated-webp:0.12.0'
  compile 'com.facebook.fresco:webpsupport:0.12.0'

  // 僅支援 WebP 靜态圖,需要添加
  compile 'com.facebook.fresco:webpsupport:0.12.0'
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17

13.RxAndroid

一句話介紹:一款Android用戶端元件間異步通信的架構

上榜理由:github上12.7k個 star,位居元件通信架構的第二名,僅在EventBus之後,如果要問兩者的差別,Eventbus是用來取代元件間繁瑣的 interface,RxAndroid是用來取代AnsyTask的,并不沖突;當然RxAndroid的優點并不僅限于此,更多優雅的實作,可以去官 網查閱!

github https://github.com/ReactiveX/RxAndroid

作者 JakeWharton

使用:

compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'io.reactivex.rxjava2:rxjava:2.1.0'           
  • 1
  • 2

14.SlidingMenu

一句話介紹:側滑菜單欄架構

上榜理由:與Userval-Image- loader 齊名的上古神器架構——為你的app提供側滑菜單欄的功能;github閃更有10.5k個star,證明了它的經久不衰,即使在Google推出了 NavigationDrawer,仍然沒有減少開發者對SildingMenu的擁簇,經典總是經得起考驗的,這個上古神獸已經四年沒有更新了;有太多 太多的app使用過它,這些都可以在軟體的開源許可上看到!

github https://github.com/jfeinstein10/SlidingMenu

作者 Jeremy Feinstein

使用:

在gihub上fork源碼,內建進項目中

15.PhotoView

一句話介紹:一款ImageView展示架構,支援縮放,響應手勢

上榜理由:10.3k的star數量,位于圖 片類架構排行榜第五位,PhotoView與前四位不同的是這次帶來的是圖檔的展示能力,你一定好奇微信的頭像點選放大是如何實作的,很多App的圖檔顯 示響應手勢按壓是如何實作的,了解PhotoView,你一定會開心的!(筆者也不會告訴你ImageView的點選放大效果在Android的 sample也有)

github https://github.com/chrisbanes/PhotoView

作者:chrisbanes

使用:

在app根目錄的build.gradle中加入:
allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}
在app的module目錄的build.gralde中加入:

dependencies {
    compile 'com.github.chrisbanes:PhotoView:latest.release.here'
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

使用

<com.github.chrisbanes.photoview.PhotoView
    android:id="@+id/photo_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>


PhotoView photoView = (PhotoView) findViewById(R.id.photo_view);
photoView.setImageResource(R.drawable.image);           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

16.material-dialogs

一句話介紹:一款自定義dialog架構

上榜理由:9.9k個star,也是繼PhotoView,SlidingMenu之後第三款自定義View架構,也許你還是自定義View的新人,對Dialog使用的還有點生疏,你可以通過它提升你的Dilaog使用能力

github https://github.com/afollestad/material-dialogs

作者:Aidan Follestad

使用:

dependencies {
    // ... other dependencies here
    compile 'com.afollestad.material-dialogs:core:0.9.4.5'
}           
  • 1
  • 2
  • 3
  • 4

17.droid-async-http

一句話介紹:一款基于Http協定的異步請求的網絡架構,

上榜理由:雖然你有無數個使用retrofit+okhttp的理由,但9.8k個star,證明它仍然值得你深入學習。值得注意的是,它也已經有兩年沒更新了,你盡管拿去當你懶惰的理由!

github https://github.com/loopj/android-async-http

作者:James Smith

使用:

repositories {
  maven {
    url 'https://oss.sonatype.org/content/repositories/snapshots/'
  }
}
dependencies {
  compile 'com.loopj.android:android-async-http:1.5.0-SNAPSHOT'
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

18.androidannotations

一句話介紹:一款基于注解的快速開發架構

上榜理由:與Butterknife一樣基于 注解,利用注解快速完成view的初始化,不同的是androidannotations提供了更多的能力:簡單的線程模型等;筆者隻接觸過 Butterknife,無法更進一步叙述androidannotations的優勢,如果你志在深入了解注解的妙用,可以嘗試探索一下!

官網位址 http://androidannotations.org/

github https://github.com/androidannotations/androidannotations

作者: WonderCsabo

19.fastjson

一句話介紹:一款基于json解析、生成的架構

上榜理由:從它的名字不難看出,快速是它最大的特性,阿裡巴巴的出身保證了代碼的品質和優越,9.4k的star數量,也是榜單裡第一個出現的中國開源架構,涉及網絡的app都會用到json,fastjson值得作為你的首選!

github https://github.com/alibaba/fastjson

作者:alibaba

使用:

compile 'com.alibaba:fastjson:1.1.58.android'           
  • 1

20.Material-Animations

一句話介紹:一款提供場景轉換過渡能力的動畫架構

上榜理由:Android動畫架構排行榜第二 名,9.3k個star數量,與動畫架構榜單第一名lottie-android不同的是,Material-Animations提供的是場景切換的動 畫效果。Android 官網sample中已經提供了部分Transition (轉場動畫)的展示,作為初學者很難快速拓展到自己項目中,Material-Animations的示例出現為開發者省去了此類麻煩,直接照搬應用到自 己的App中吧。

github https://github.com/lgvalle/Material-Animations

作者:Luis G. Valle

使用:

down源碼,修改學習

21.tinker

一句話介紹:它是微信官網的Android熱更新檔解決方案

上榜理由:9.1k個star,微信在用的熱更新檔方案,心動不如行動

官網位址 http://www.tinkerpatch.com/Docs/intro

github https://github.com/Tencent/tinker

作者:Tencent

22.ViewPagerIndicator

一句話介紹:一款基于ViewPager的頁面訓示器開源架構

上榜理由:上古神器,盡管已經五年未更新了,但你仍然可以在淘寶等app中看到它的使用場景,8.9K的star量讓它不愠不火的在矗立在榜單裡

官網位址 http://viewpagerindicator.com/

github https://github.com/JakeWharton/ViewPagerIndicator

作者:JakeWharton

使用:

下載下傳 位址 https://github.com/JakeWharton/Android-ViewPagerIndicator/zipball/master

23.Android-CleanArchitecture

一句話介紹:一個講解設計架構的demo

上榜理由:它不是架構,你可以把它當作一本書,它将教會你如何設計簡潔的架構,工程裡有一個sample app,配合圖文講解,你将對Android用戶端的架構有更深一層的認識。8.8k的star數量,證明了它是一本“好書”喲。

github https://github.com/android10/Android-CleanArchitecture

作者:Fernando Cejas

24..Android-PullToRefresh

一句話介紹:一款為普通視圖提供重新整理UI的視圖架構

上榜理由:8.2K的star數量使它位居刷 新類UI架構榜首,強大的相容能力,該架構支援ListView,GrdiView,WebViewScrollView,ViewPager等衆多 View增加重新整理的能力,如果你有增加上拉加載,下拉加載的需求,你應該考慮它了!

github https://github.com/chrisbanes/Android-PullToRefresh

作者:Chris Banes

使用:

github fork源碼,內建到項目中

25.flexbox-layout

一句話介紹:一款彈性伸縮布局

上榜理由:8.1k個star,前端H5開發者轉Android開發的福音,FlexboxLayout作為LinearLayout和RelativeLayout的替代者,值得各位一試,與其一同推出的還有ConstraintLayout。

github https://github.com/google/flexbox-layout

作者:Google

使用:

dependencies {
    compile 'com.google.android:flexbox:0.3.0-alpha3'
}           
  • 1
  • 2
  • 3

26.AndroidSwipeLayout

一句話介紹:非常強大滑動式布局

上榜理由:滑動删除是國産app常見需求,商品詳情的上下滑動需求作為開發者的我們也經常遇到,AndroidSwipeLayout在github上擁有8K個star,證明它經受住了檢驗,各位值得一試

github https://github.com/daimajia/AndroidSwipeLayout

作者:daimajia

使用:

dependencies {
    compile 'com.android.support:recyclerview-v7:21.0.0'
    compile 'com.android.support:support-v4:20.+'
    compile "com.daimajia.swipelayout:library:1.2.0@aar"
}           
  • 1
  • 2
  • 3
  • 4
  • 5

27.realm-java

一句話介紹:Realm是一款移動端資料庫架構

上榜理由:核心資料引擎C++打造,比普通的Sqlite型資料庫快的多。筆者猜測正是如此,realm以7892個star數讓它位于大名鼎鼎的資料庫架構GreenDao(7877)之前

官網位址:https://realm.io/cn/

github https://github.com/realm/realm-java

作者:Realm團隊

使用:https://realm.io/docs/java/latest/

28.greenDAO

一句話介紹:greenDAO是一款高效、快速的SQLite型資料庫

上榜理由:greenDAO的star數量與 Realm不相上下,且與EventBus師出同門,也是由greenrobot團隊開發維護的,品質有所保證,但若拷問筆者Realm與 greenDao兩者的優劣性,隻能具體到實際使用當中,模拟線上的使用情形,進行高強度測試後才能下判斷,故在此不能一言兩語說完,深表遺憾

官網位址:http://greenrobot.org/greendao/

github https://github.com/greenrobot/greenDAO

使用: 

複制代碼

buildscript {
    repositories {
        jcenter()
        mavenCentral() // add repository
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.1'
        classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2' // add plugin
    }
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
apply plugin: 'com.android.application'
apply plugin: 'org.greenrobot.greendao' // apply plugin

dependencies {
    compile 'org.greenrobot:greendao:3.2.2' // add library
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

29.stetho

一句話介紹:一款提供在Chrome開發者工具上調試Android app能力的開源架構

上榜理由:上古時期Android程式員要調 試本地資料庫,需要進入Android Device Monitor找到/data/data/com.xxx.xxx/databases裡面的db檔案,導出到PC端,用PC的資料工具檢視,現在使用 stetho省卻了如此的麻煩;如今的Android程式員如果想調試網絡請求響應過程中的封包段,需要在請求中加入Log語句,一個資訊一個資訊列印出 來,相當繁瑣,現在請使用stetho,省卻諸如此類的麻煩把!7.8K個star數,廣大Android開發者調試的福音,你值得擁有!

作者:FaceBook

官網位址: http://facebook.github.io/stetho/

github https://github.com/facebook/stetho

使用:

compile 'com.facebook.stetho:stetho:1.5.0'           
  • 1

30.BaseRecyclerViewAdapterHelper

一句話介紹:強大、流暢的Recyvlerview通用擴充卡

上榜理由:如果你是RecyclerView的擁簇者,你一定要體驗這款專門服務該view的擴充卡,7.7K個star,讓這個家夥位于github上Android 擴充卡排行榜第一,還有很多驚喜等你去探尋!

官網位址:http://www.recyclerview.org/

作者:陳宇明以及他的小夥伴

使用:

allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}


dependencies {
        compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:VERSION_CODE'
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

31.AndroidViewAnimations

一句話介紹:一款提供可愛動畫集合的架構

上榜理由:正如作者所說,它囊括了開發需求過 程中所有的動畫效果,內建進了這個簡潔可愛的動畫架構。7.6K的star數,證明了它在動畫架構領域的戰鬥力,讓它僅僅位列lottie- android和Material-Animations兩個動畫架構霸主之後,屈居第三名

github https://github.com/daimajia/AndroidViewAnimations

作者:daimajia

使用:

dependencies {
        compile 'com.android.support:support-compat:25.1.1'
        compile 'com.daimajia.easing:library:2.0@aar'
        compile 'com.daimajia.androidanimations:library:2.2@aar'
}

sample:

YoYo.with(Techniques.Tada)
    .duration()
    .repeat()
    .playOn(findViewById(R.id.edit_area));           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

32. MaterialDrawer

一句話介紹:強大的塑膠風格的抽屜架構

上榜理由:7.6K的star數量,作者的持續更新狀态,如果你還在猶豫上手SlidingMenu遇到bug沒人管的困境,那麼你可以入手它作為你的抽屜布局

github https://github.com/mikepenz/MaterialDrawer

作者:Mike Penz

使用:

compile('com.mikepenz:materialdrawer:[email protected]') {
    transitive = true
}



new DrawerBuilder().withActivity(this).build();           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

33.Android-ObservableScrollView

一句話介紹:一款讓視圖滑動更具有視覺效果的滑動式架構

上榜理由:7.5K的star數量,證明了它曾經的價值,github上提供了12種滑動效果,你可以用它彌補其他架構的不足,提升你的App體驗!

github https://github.com/ksoichiro/Android-ObservableScrollView

作者:Soichiro Kashima

使用:

compile com.github.ksoichiro:android-observablescrollview           
  • 1

34.CircleImageView

一句話介紹:圓角ImageView

上榜理由:也許你已經聽說過無數種展示圓角圖檔的方法,但如果你不嘗試嘗試CircleImageView,那麼你的知識庫會因為少了它黯然失色,有的時候完成需求是開發者優先考慮的,不同實作方法牽扯到的性能差異更值得讓人深思,如果你有心在圖檔性能上有所涉獵,那麼CircleImageView絕對不會讓你敗興而歸。最後别忘了記得去看Romain Guy的建議喲。

github https://github.com/hdodenhof/CircleImageView

作者:Henning Dodenhof

使用:

dependencies {
    ...
    compile 'de.hdodenhof:circleimageview:2.1.0'
}           
  • 1
  • 2
  • 3
  • 4
<de.hdodenhof.circleimageview.CircleImageView
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/profile_image"
    android:layout_width="96dp"
    android:layout_height="96dp"
    android:src="@drawable/profile"
    app:civ_border_width="2dp"
    app:civ_border_color="#FF000000"/>           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

35.logger

一句話介紹:一款讓log日志優雅顯示的架構

上榜理由:logger作為調試架構,并未給 出很強大的能力,它最大的亮點是優雅的輸出log資訊,并且支援多種格式:線程、Json、Xml、List、Map等,如果你整日沉迷于汪洋大海般的 log資訊不能自拔,logger就是你的指路明燈!6.6k個star讓他位列調試架構第二名,屈居facebook的stetho之後

github https://github.com/orhanobut/logger

作者:Orhan Obut

使用:

compile 'com.orhanobut:logger:2.1.1'           
  • 1
Logger.d(MAP);
Logger.d(SET);
Logger.d(LIST);
Logger.d(ARRAY);
Logger.json(JSON_CONTENT);
Logger.xml(XML_CONTENT);           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

36.agera

一句話介紹:一款服務于Android平台的響應式程式設計架構

上榜理由:google專門推出一套響應式編 程架構服務于Android開發者,相比于之響應式程式設計架構榜首的 RxJava RxAndroid,它更輕量,兩者最大的不同點在于agera基于push event、pull data (VS Rx系列 push data)。

github https://github.com/google/agera

作者:Google

使用:

compile 'com.google.android.agera:agera:1.3.0'

擴充能力

  compile 'com.google.android.agera:content:1.3.0'
  compile 'com.google.android.agera:database:1.3.0'
  compile 'com.google.android.agera:net:1.3.0'
  compile 'com.google.android.agera:rvadapter:1.3.0'
  compile 'com.google.android.agera:rvdatabinding:1.3.0'           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

37.BottmBar

一句話介紹:一款底部導航欄視圖架構

上榜理由:底部欄裡的王者架構,6.3K的 star數量,證明了它的優秀,完全遵循材料設計規範,上手非常友善。如果說缺點,無法設定icon與titile的間距,無法自定義視圖的大小等,但這 些都可以通過修改源代碼解決,筆者獻醜也修改了一套符合國内開發者的底部導航架構,即将開源。

github https://github.com/roughike/BottomBar

作者:Iiro Krankka

使用:

compile 'com.roughike:bottom-bar:2.3.1'           
  • 1

38.Calligraphy

一句話介紹:一款自定義字型架構

上榜理由:如果你還在為一鍵修改App内所有字型樣式而煩惱,6.3K個star的Calligraphy就值得你擁有,它可以同時修改整個整個項目的Textview字型,也可以單獨 設定某個Textview的字型,還在等什麼,快來試試吧!

github https://github.com/chrisjenx/Calligraphy

作者:Christopher Jenkins

使用:

dependencies {
    compile 'uk.co.chrisjenx:calligraphy:2.3.0'
}           
  • 1
  • 2
  • 3

39.AndroidSlidingUpPanel

一句話介紹:可拖動的滑動面闆視圖架構

上榜理由:如果你的項目需要一個可拖拽的滑動式面闆(展示某些詳情資訊,播放音樂,地圖資訊等),那麼推薦你使用它,6.3k個star,來自創業公司umano的作品,證明它是用心推出的傑作

github https://github.com/umano/AndroidSlidingUpPanel

作者:umano

使用:

dependencies {
    repositories {
        mavenCentral()
    }

    compile 'com.sothree.slidinguppanel:library:3.3.1'
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

40.AppIntro

一句話介紹:一款提供快速制作歡迎頁的架構

上榜理由:筆者從未把打算把歡迎頁架構納入排 行榜當中,作為國内開發者,ViewPager開發App的歡迎頁已經是手到擒來的需求,為何一個開源的歡迎頁架構會在github上擁有6.3k個 star?也許你會不屑一顧,是的,往往就在不屑一顧的瞬間,機遇就悄悄溜走了。

github https://github.com/apl-devs/AppIntro

作者:Paolo Rotolo

allprojects {
        repositories {
            ...
            maven { url 'https://jitpack.io' }
        }
    }

    dependencies {
            compile 'com.github.apl-devs:appintro:v4.2.0'
    }           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

41.recyclerview-animators

一句話介紹:一款為Recyclerview提供擴充動畫能力的架構

上榜理由:有一句老話:如果有天你失去對新事 物的興趣,那就說明你老了。recyclerview已經推出快三年了,還在用listview的人們,是否已經發掘自己漸漸變老;不要灰心,快為你的項 目加入recyclerview-animators架構吧,為“自己”加入新鮮的血液和能量!(筆者備注:6.2K個star)

github https://github.com/wasabeef/recyclerview-animators

作者;https://github.com/wasabeef

使用:

dependencies {
  // jCenter
  compile 'jp.wasabeef:recyclerview-animators:2.2.6'
}           
  • 1
  • 2
  • 3
  • 4

42.dagger

一句話介紹:一款通過依賴注入降低程式間耦合的開發架構

上榜理由:github 上dagger1版本 有6.2k個star , dagger2版本有7.3k個;由square完成的dagger1版本,到如今google團隊接手的dagger2版本,強力開發團隊保證了代碼在 設計上的優越性;如果你想探究Android 領域的設計模式,這也是不錯的選擇。

官網位址:https://google.github.io/dagger/

github :https://github.com/google/dagger

作者:google

使用:

dependencies {
  compile 'com.google.dagger:dagger:2.x'
  annotationProcessor 'com.google.dagger:dagger-compiler:2.x'
}
If you're using classes in dagger.android you'll also want to include:

compile 'com.google.dagger:dagger-android:2.x'
compile 'com.google.dagger:dagger-android-support:2.x' 
annotationProcessor 'com.google.dagger:dagger-android-processor:2.x'           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

43.Android-Bootstarp

一句話介紹:一款提供在Android應用上實作Bootstrap(web架構)所作出效果的架構

上榜理由:榜單上第二款響應web技術的Android 端架構,還記得第一名是誰嗎——flexbox-layout,作為Android開發者,你有必要去了解Web技術了。5.9k個star,證明它不容小觑

github https://github.com/Bearded-Hen/Android-Bootstrap

作者:Bearded-Hen團隊

使用:

dependencies {
   compile 'com.beardedhen:androidbootstrap:{X.X.X}'
}           
  • 1
  • 2
  • 3

44.RxBinding

一句話介紹:一款提供UI元件事件響應能力的架構

上榜理由:如果你還未開始RxAndroid 之旅,RxBinding可以作為你的第一站,通過RXBinding,你将了解響應式程式設計的快樂,讓項目裡的事件流程更清晰。5.6K個star,RxAndroid作者親自操刀,快來試用吧!

github https://github.com/JakeWharton/RxBinding

作者:JakeWharton

Platform bindings:

compile 'com.jakewharton.rxbinding2:rxbinding:2.0.0'
'support-v4' library bindings:

compile 'com.jakewharton.rxbinding2:rxbinding-support-v4:2.0.0'
'appcompat-v7' library bindings:

compile 'com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.0.0'
'design' library bindings:

compile 'com.jakewharton.rxbinding2:rxbinding-design:2.0.0'
'recyclerview-v7' library bindings:

compile 'com.jakewharton.rxbinding2:rxbinding-recyclerview-v7:2.0.0'
'leanback-v17' library bindings:

compile 'com.jakewharton.rxbinding2:rxbinding-leanback-v17:2.0.0'           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18

45.ListViewAnimations

一句話介紹:一款為ListView提供動展示畫效果能力的架構

上榜理由:如果有一天我承認自己老了,我還會 排排我的兄弟——ListView,證明我和它一起戰鬥過。ListViewAnimations的存在就是證明我們這些“老年人”仍有用武之地,也許你 有說不出口的難處,無法體會到RecyclerView裡動畫的快樂,擁有ListViewAnimations,你一樣可以驕傲的說,我的孩子(每個 item)也有自己的動效啦。(筆者備注 5.6K個star)

github https://github.com/nhaarman/ListViewAnimations

作者:nhaarman

使用:

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.nhaarman.listviewanimations:lib-core:[email protected]'
    compile 'com.nhaarman.listviewanimations:lib-manipulation:[email protected]'
    compile 'com.nhaarman.listviewanimations:lib-core-slh:[email protected]'
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

46.UItimateRecyclerView

一句話介紹:一款提供重新整理、加載更多、動畫特效等額外能力的RecyclerView架構

上榜理由:榜單上第三次出現 RecyclerView的身影,足以證明RecyclerView的優異性,5.5K個star,架構裡所提供衆多的能力,如果你是個功利開發者,那麼 此架構會為你節省很多學習時間,它可以完成多item式布局的大多數需求,值得注意的是,這個項目也是在其他項目的思路上二次開發的。

github https://github.com/cymcsg/UltimateRecyclerView

作者:MarshalChen

使用:

repositories {
    jcenter()
    }
dependencies {
    ...
    compile 'com.marshalchen.ultimaterecyclerview:library:0.7.2'
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

47.uCrop

一句話介紹:一款優雅的圖檔裁剪架構

上榜理由:5.3K個star,圖檔編輯子產品單獨拎出來也是一款優雅的App。

github https://github.com/Yalantis/uCrop

作者:Yalantis

使用:

allprojects {
   repositories {
      jcenter()
      maven { url "https://jitpack.io" }
   }
}

compile 'com.github.yalantis:ucrop:2.2.1'            
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

48.RxJava-Android-Samples

一句話介紹:一款介紹RxJava使用場景的app

上榜理由:榜單出現的第一個“僅僅為告訴你如何使用另一個項目”的開源項目,它可以說是RxJava的用例,你想得到的想不到的RxJava用法這裡都有,這就是為什麼它以5.2k個star矗立在這份榜單裡的原因。遺憾自己沒有創作這麼一個受人追捧的demo?趕快動手寫個其他的“XX項目用例吧”

github https://github.com/kaushikgopal/RxJava-Android-Samples

作者:kaushikgopal

使用:

clone到本地慢慢探索吧

49.AndroidAutoLayout

一句話介紹:一個提供适配能力的架構

上榜理由:5.2K個star,鴻洋老弟的作 品,适合小項目的開發團隊,拿到設計MM的px像素設計稿是不是很頭疼捏?這個架構一鍵式搞定你的問題,它有很多的不足,但在追求完美适配的路上,你值得 探索和了解它!筆者并不推薦把它應用到已經成熟運作的項目中,畢竟市面上已經有太多的适配解決方案了,适配問題就像是個大雜燴,想炒一盤好菜,就得備好各 種佐料(适配小方案),當你把各種小佐料用的爐火純青的時候,你離美食大廚就不遠了。

github https://github.com/hongyangAndroid/AndroidAutoLayout

作者:張鴻洋

使用:

dependencies {
    compile 'com.zhy:autolayout:1.4.5'
}           
  • 1
  • 2
  • 3

50.EffectiveAndroidUI

一句話介紹:一款講解高效展示UI的教學型App

上榜理由:程式設計新手很難對MVC MVP,MVVM等模式有深刻的了解,如果有一個示例型app,那對初學者會有很大裨益,筆者在遇到它時也是相見恨晚。4.8K個star,證明了它經受 了廣大開發者的考驗與審視,其中Effective UI的程式設計思想更是與Android官方課程裡的Effective UI課程不謀而合,并且,此項目還包含了fragment、dagger、主題樣式、Butterknife等衆多小知識點,作為程式設計初學者的學習用例再 适合不過了

github https://github.com/pedrovgs/EffectiveAndroidUI

作者:Pedro Vicente

使用:

clone項目到本地

51.Luban

一句話介紹:最接近微信的圖檔壓縮架構

上榜理由:好的思路總是可以讓你大放異彩,Luban僅以圖檔壓縮單一功能,俘獲了4.8K個star,證明了它在圖檔壓縮上的造詣,它可能不是最優秀的,但它是讓你我最接近偉大的項目

github https://github.com/Curzibn/Luban

作者:Curzibn

使用:

compile 'top.zibin:Luban:1.1.1'           
  • 1

52.DroidPlugin

一句話介紹:一款熱門的插件化開發架構 

上榜理由:4.8K個star,插件化架構榜單第一名,,360團隊出品,架構品質有保證,有成功案例——360手機助手,并且持續維護着 

github https://github.com/DroidPluginTeam/DroidPlugin/blob/master/readme_cn.md 

作者:Andy Zhang 

使用: 

clone項目到本地

53. otto

一句話介紹:一款老舊且強大的事件總線架構 

上榜理由:4.8K個star,是 square團隊早先推出的事件響應型架構,淘寶app的事件驅動也是基于此架構封裝的,如今square已經建議開發者采用RxJava RxAndroid來代替otto了。但otto仍有與EventBus橫向對比的價值,縱向來說,otto與square自家開發的Rx系列架構的差異 同樣值得開發者們去探究。 

github https://github.com/square/otto 

作者:square 

使用:

repositories {
    mavenCentral()
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}

compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

54.u2020

一句話介紹:一款提供Dagger的進階教學示例的app(額,名字是有點繞) 

上榜理由:4.7K個 star,JakeWharton牽頭開發的教學類app,教你使用Dagger在其他進階架構的用法,它展示了Dagger與ButterKnife、 Retrofit、Moshi、Picasso、Okhttp、RxJava、Timber、Madge、LeakCanar等衆多優秀架構結合起來的高 級用法,你也可以借鑒到自己的項目當中 

github https://github.com/JakeWharton/u2020 

作者:JakeWharton

55.buck

一句話介紹:buck是一個快速建構系統 

上榜理由:facebook+google出 身的作者,對建構代碼的出色了解,加上大型團隊的維護,以及增量更新時的快速高效,讓buck成為了微信Android團隊建構項目的首選,建構大型項目 時,它比gradle更快,然而中小公司并不适合此架構,但作為立志在架構設計領域有一番作為的人們,歡迎來一探究竟 

官網位址:https://buckbuild.com/ 

github https://github.com/facebook/buck 

作者:facebook 

使用:

linux or mac system  +docs           
  • 1

56.PermissionsDispatcher

一句話介紹:一款基于注解的提供解決運作時危險權限方案的架構 

上榜理由:自Android6.0 Google提出危險權限一詞起,使用者安全性被提到一定的高度,一些運作時對使用者較為危險的權限将不再自動被開發者擷取,需要經過使用者準許,開發者才可以 繼續使用該權限,如果你曾經被權限問題搞的抓耳撓腮,建議你試試這個架構,它足夠解決你的問題 

官網位址:https://hotchemi.github.io/PermissionsDispatcher/ 

github https://github.com/hotchemi/PermissionsDispatcher 

作者:Shintaro Katafuchi 

使用:

dependencies {
  compile('com.github.hotchemi:permissionsdispatcher:${latest.version}') {
      exclude module: "support-v13"
  }
  annotationProcessor 'com.github.hotchemi:permissionsdispatcher-processor:${latest.version}'
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
repositories {
  jcenter()
  maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local/' }
}           
  • 1
  • 2
  • 3
  • 4

57.android-gif-drawable

一句話介紹:一款提供展示GIF動畫能力的視圖架構

上榜理由:據我所查國内著名App——知乎使 用了android-gif-drawable,是以證明了它的存在價值,盡管在榜單第十一位介紹了lottie-android直接應用AE動畫的示 例,但AE設計師不是每個公司都配備的,GIF的存在,就必然存在了展示GIF的需要,它值得你擁有!

github https://github.com/koral–/android-gif-drawable

作者:Karol Wrótniak

使用:

repositories {
    mavenCentral()
    maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
dependencies {
    compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.+'
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

58.Apktool

一句話介紹:一款反編譯apk的工具

上榜理由:開源的反編譯工具,對于志在了解apk逆向破解的諸位,值得擁有,4.5k個star,逆向破解apk神器!

github https://github.com/iBotPeaches/Apktool

官網位址:https://ibotpeaches.github.io/Apktool/

作者:Connor Tumbleson

59.dynamic-load-apk

一句話介紹:插件化開發架構

上榜理由:4.5k個star,位于插件化開發架構第二名(第一名來自360團隊),全面的文檔介紹讓你很快就能上手插件化開發,如果你喜歡大段文字講解,那麼這個項目一定适合你

github:https://github.com/singwhatiwanna/dynamic-load-apk

作者:singwhatiwanna

使用:

github上的文檔配合作者部落格更配喲

60.atlas

一句話介紹:淘寶推出的元件化開發架構

上榜理由:淘寶團隊所出的精品,atlas架構提供了解耦、元件、動态的開發能力,4.5k個star讓他位列元件化開發架構第一名

github https://github.com/alibaba/atlas

作者:alibaba

61.volley

一句話介紹:google推薦使用的Android端網絡請求架構

上榜理由:4.4k個star,并不是他不夠優秀,而是使用volley已經漸漸成為廣大開發者的習慣

github https://github.com/google/volley(新版volley位址)

作者:google

使用:

clone源碼到本地

62.androidmvp

一句話介紹:一款展示Android端Mvp設計的demo 

上榜理由:榜單裡為數不多、僅憑展示某種設計模式就獲得4.2K個star的項目,如果你有嘗試mvp的打算,androidmvp可以作為你的前哨站 

github https://github.com/antoniolg/androidmvp 

作者:Antonio Leiva 

使用: 

clone到本地

63.SwipeBackLayout

一句話介紹:一款可以讓你通過滑動手勢關閉頁面的的架構 

上榜理由:仿微信滑動退出目前聊天界面的效果,提供了activity的滑動關閉能力,通過這種思路,實作fragment的滑動關閉輕而易舉;筆者堅持建議諸位clone源碼到本地探索一番;4.2k個star證明很多人都喜愛它 

github https://github.com/ikew0ng/SwipeBackLayout 

作者:ike_w0ng 

使用:

compile 'me.imid.swipebacklayout.lib:library:'           
  • 1

64.FlycoTabLayout

一句話介紹:一款可以讓作出多種多樣訓示器效果的架構

上榜理由:盡管我們沒有理由為了給app加入 頁面訓示器功能就內建2.5M的依賴庫,但是作為了解viewpager或swip views的訓示器設計原理的優秀架構,你值得打開它試試,筆者建議單獨拆分所需源碼,加入到自己的項目中去。4.1K個star,二次開發的作品,仍然 推薦!

github https://github.com/H07000223/FlycoTabLayout

作者:Flyco

65.android-testing

一句話介紹:一款展示四大自動化測試架構用例的demo(Espresso,UiAutomator,AndroidJunitRunner,JUnit4)

上榜理由:學習者經常會陷入似懂非懂的境地,如果你有幸學習過Android Testing Support Library site的課程,那麼你一定對android的四大測試架構迫不及待,這款demo非常适合你,快來學習這個4.1k個star的明星項目吧

github https://github.com/googlesamples/android-testing

作者:googlesampes團隊

66.FileDownloader

一句話介紹:一款高效、穩定、靈活、易用的檔案下載下傳引擎

上榜理由:4.1k證明了它有多受人喜愛,檔案下載下傳看似簡單的背後暗藏了多少的坑坑點點,我知道你有能力自己實作檔案下載下傳功能,但優秀的架構可以提升你的設計編碼能力,這款架構可以提升你的實力!

github https://github.com/lingochamp/FileDownloader

作者:LingoChamp團隊

使用:

dependencies {
    compile 'com.liulishuo.filedownloader:library:1.5.5'
}           
  • 1
  • 2
  • 3

67.JieCaoVideoPlayer

一句話介紹:基于MediaPlayer api——VideoView 的多媒體播放架構

上榜理由:榜單裡第三款多媒體播放架構,它以靈巧的身姿擠入本榜單,精巧是它最大的優點,不到100k,擁有它,你就可以快速開發類似今日頭條那樣的視訊播放效果,4k個star,證明它值得一試

github https://github.com/lipangit/JieCaoVideoPlayer

作者:Nathen 

使用:

compile 'fm.jiecao:jiecaovideoplayer:5.5.4'           
  • 1

68.glide-transformations

一句話介紹:為衆多著名圖檔加載架構提供圖檔形狀變幻能力的架構 

上榜理由:在榜單靠前的部分已經介紹過glide,Picasso,Fresco等圖檔加載架構,glide-transformations就是一款為他們提供圖檔變形能力的架構,使用起來非常簡單,是以受到了大家的喜愛,github上有3.8K個star 

github https://github.com/wasabeef/glide-transformations 

作者:Daichi Furiya 

使用:

repositories {
    jcenter()
}

dependencies {
    compile 'jp.wasabeef:glide-transformations:2.0.2'
    // If you want to use the GPU Filters
    compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.4.1'
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
在Glide裡設定變幻效果

Set Glide Transform.

Glide.with(this).load(R.drawable.demo)
        .bitmapTransform(new BlurTransformation(context))
        .into((ImageView) findViewById(R.id.image));

           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

69.android-gpuimage

一句話介紹:一款基于OpenGL的圖檔渲染引擎 

上榜理由:放下GpuImage在IOS平台 的榮譽不談,Android版的android-gpuimage就提供多達70多種圖檔渲染效果,你還在好奇美圖秀秀是如何實作圖檔變幻的?有了它,一 切都不是問題。如果你是美圖工具類的工程師,此架構的建設思路也會對你大有裨益。筆者也是通過android-gpuimage仿造了美圖App并俘獲女 友芳心的,再次為它的實力點贊。ios版+android版一共19k個star,已經證明了它的實力,還在等什麼呢? 

github:https://github.com/CyberAgent/android-gpuimage 

作者:CyberAgent 團隊 

使用:

repositories {
    jcenter()
}

dependencies {
    compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.4.1'
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

更多的改造方法,還需要閱讀Ios的程式設計文檔,對于有毅力的小夥伴強力推薦!

70.RxPermissions

一句話介紹:一款基于RxJava完成權限申請的架構 

上榜理由:榜單裡第二款提供權服務的架構,基于RxJava的設計,讓你可以專心寫業務,3.7K個star已經證明了它的實用價值 

github https://github.com/tbruyelle/RxPermissions 

作者:Thomas Bruyelle

使用:

repositories {
    jcenter() // If not already there
}

dependencies {
    compile 'com.tbruyelle.rxpermissions:rxpermissions:[email protected]'
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

優雅的使用:

RxPermissions rxPermissions = new RxPermissions(this); 

rxPermissions
    .request(Manifest.permission.CAMERA)
    .subscribe(granted -> {
        if (granted) { // I can control the camera now
        } else {
           // Oups permission denied
        }
    });           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

71.freeline

一句話介紹:一款動态替換的編譯建構架構

上榜理由:繼Facebook的Buck,Androdi官方的InstRun之後,螞蟻金服推出了Freeline編譯架構,官網宣稱Freeline與業内主流建構方式相比仍然有數倍的速度領先;排行有先後,編譯速度并不在本榜單排序的考據因素中,是以freeline以3.7個star,暫列編譯架構第二名

官網位址:https://www.freelinebuild.com/

github:https://github.com/alibaba/freeline

作者:alibaba

使用:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.antfortune.freeline:gradle:0.8.7'
    }
}

apply plugin: 'com.antfortune.freeline'

android {
    ...
}

File → Settings... → Plugins → Browse repositories →freeline.           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16

72.RxLifecycle

一句話介紹:一款提供在使用RxJava過程中管理Activity和Fragment生命周期能力的架構

上榜理由:在榜單靠前的部分,你已經了解 RxJava和RxAndroid的強大之處,但部分粗心的開發者因為沒有及時取消訂閱而産生嚴重的記憶體洩漏,不要擔心,RxLifecycle可以為你 解決難題,在gtihub上擁有3.7K個star,國内知名軟體——知乎和淘寶也都在使用它

github https://github.com/trello/RxLifecycle

作者:trello團隊

使用:

clone源碼到本地

73.classyshark

一句話介紹:一款可執行檔案浏覽器

上榜理由:榜單裡繼Apktool之後第二款apk逆向工具,如果你喜歡優雅的圖形資料展示,那麼你一定不能錯過他,classyshark可以将破解的結果以圖形化展示使用者,友善分析,3.7K個star,讓它暫列apk逆向工具第二位!

github https://github.com/google/android-classyshark

作者:google

使用:

下載下傳 JAR

74.acra

一句話介紹:一款提供記錄APP崩潰日志能力的架構

上榜理由:如果你面臨着收集APP崩潰日志的需求,那麼acra是個不錯的選擇。3.7K個star,讓acra位列崩潰日志架構排行榜第一名,acra有足夠的能力記錄線上APP,并且發回服務端,acra也提供了相當棒的崩潰日志統計服務端架構Acralyzer,cralyzer工作在Apache CouchDB之上,是以除了CouchDB之外,沒有必要安裝任何額外的軟體,移動端開發者也可以借此學習服務端的建設,一舉兩得!

github https://github.com/ACRA/acra

服務端github https://github.com/ACRA/acralyzer

作者:acra團隊

使用:

沒有什麼方法比clone源碼到本地更友善了

75.DiskLruCache

一句話介紹:一款提供磁盤檔案緩存管理能力的架構

上榜理由:3.7k個star并不足以說明 DiskLruCache的優秀,僅僅以管理磁盤檔案能力單獨拎出來成為一個架構,作者需要很大的勇氣,很幸運,作者做到了,并且也成為Google官網 提倡的緩存 ;如還記得上次做“一鍵清除緩存”、“檢視緩存檔案大小”功能是什麼時候嗎?DiskLruCache一句話就可以搞定!

github https://github.com/JakeWharton/DiskLruCache

作者:JakeWharton

使用:

compile 'com.jakewharton:disklrucache:2.0.2'           
  • 1

76.dexposed

一句話介紹:一款支撐阿裡大部分App用戶端熱修複、線上調試能力的架構

上榜理由:榜單上再次出現熱修複架構的身影, 證明App熱修複技術的火熱,dexposed提供圖形化的性能監控、線上熱修複bug漏洞、支援AOP程式設計思想等,不論你是企業熱修複技術的設計者還是 打算在熱修複領域一探究竟的新人,這款架構很适合你。3.5k個star,證明它作為一門技術架構的存在,是多麼令人喜愛!

github https://github.com/alibaba/dexposed

作者:alibaba

使用:

dependencies {
        compile 'com.taobao.android:dexposed:0.1.1@aar'
    }

           
  • 1
  • 2
  • 3
  • 4
  • 5

77.Litho

一句話介紹:一款提供高效建構UI能力的架構

上榜理由:作為一款專門建構UI的架構,Litho高效的地方在于:單獨開辟了用于渲染和布局的線程,然後将建立好的元件傳遞給UI線程去完成最終的渲染,使用更少的視圖層級,來提升界面的滾動速度,值得注意的是,它僅支援開發者作出不可改變的UI元件 ,3.5K個star,證明了它在建構UI領域的價值,更多的妙處,期待你親自去發掘!

github https://github.com/facebook/litho

作者:facebook

使用:

ependencies {
  // ...
  // Litho
  compile 'com.facebook.litho:litho-core:0.3.1'
  compile 'com.facebook.litho:litho-widget:0.3.1'
  provided 'com.facebook.litho:litho-annotations:0.3.1'

  annotationProcessor 'com.facebook.litho:litho-processor:0.3.1'

  // SoLoader
  compile 'com.facebook.soloader:soloader:0.2.0'

  // Optional
  // For debugging
  debugCompile 'com.facebook.litho:litho-stetho:0.3.1'

  // For integration with Fresco
  compile 'com.facebook.litho:litho-fresco:0.3.1'

  // For testing
  testCompile 'com.facebook.litho:litho-testing:0.3.1'
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22

78.mosby

一句話介紹:一款提供建構MVP項目能力的架構

上榜理由:榜單靠前的部分已經介紹了 MVC,MVVM,MVP的架構項目,想必此時你在建構企業項目架構上,選擇或者開發一款合适的MVP架構迫在眉睫,mosby可以作為你的第一步參考, 你可以封裝它,也可以照抄它,無論如何,3.4K個star,證明了它在架構設計上有多受開發者的喜愛

github https://github.com/sockeqwe/mosby

作者:Hannes Dorfmann

使用:

dependencies {

  compile 'com.hannesdorfmann.mosby3:mvi:3.0.4' // Model-View-Intent
  // or
  compile 'com.hannesdorfmann.mosby3:mvp:3.0.4' // Plain MVP
  // or
  compile 'com.hannesdorfmann.mosby3:viewstate:3.0.4' // MVP + ViewState support
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
allprojects {
  repositories {
    ...

    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

79.AndResGuard

一句話介紹:一款提供資源檔案路徑混淆 的工具

上榜理由:如果你是個對APK大小很敏感的人,那麼AndResGuard一定适合你,它的原理類似Java Proguard,但是隻針對資源。他會将原本冗長的資源路徑變短,例如将res/drawable/wechat變為r/d/a,3.4K個star,證明了在優化APK道路上,你不是一個人在戰鬥!

github https://github.com/shwenzhang/AndResGuard

作者:wechat team

使用:

clone項目到本地,其實也就是個三兩句話的文檔

80.StatusBarUtil

一句話介紹:一款提供設定沉浸式狀态欄樣式能力的架構

上榜理由:設計師MM總是抱怨系統狀态欄不優雅?那就給她一個完美的沉浸式狀态欄。StatusBarUtil可以随心所欲的設定狀态欄樣式,3.3K個star,足以說明它有多受設計MM的喜愛

github https://github.com/laobie/StatusBarUtil

作者:Jaeger

使用:

compile 'com.jaeger.statusbarutil:library:'           
  • 1

81.robolectric

一句話介紹:一款不依賴于Android裝置的單元測試架構,

上榜理由:sample中列舉了如何對Android四大元件和常見功能測試的用例,3.2K個star,值得充滿好奇心的人嘗試

官網位址:http://robolectric.org/

github https://github.com/robolectric/robolectric

作者:robolectric

使用:

testCompile "org.robolectric:robolectric:3.3.2"           
  • 1

82.Fragmentation

一句話介紹:一款提供管理Fragmen嵌套t能力的架構

上榜理由:對于Activity和 Fragment使用,你一定得心應手,但如果要做一套通用的Activity&Fragment嵌套設計,想必你有點手足無措 了,Fragmentation可以作為你設計Fragment管理上的第一步,3.2K個star,筆者認為有點名副其實了,項目介紹裡說的是 Fragment的管理能力,但并未提供Fragment&Activity生命周期、任務棧的管理能力,是以很難直接應用到企業項目當中,但源 碼當中的設計思路,值得筆者與諸位借鑒,拾人牙慧留有餘香!

github:https://github.com/YoKeyword/Fragmentation

作者:YoKey

使用:

// appcompat v7包是必須的
compile 'me.yokeyword:fragmentation:0.10.7'
// 如果想使用SwipeBack 滑動邊緣退出Fragment/Activity功能,請再添加下面的庫
// compile 'me.yokeyword:fragmentation-swipeback:0.10.4'

           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

83.Small

一句話介紹:輕巧的插件化架構

上榜理由:作為插件架構榜單的新成員,Small的優點是輕巧,适合作為小團隊的插件開發方案,3.1K個star,讓它獲得了酷狗音樂等著名開發團隊的青睐,如果你們的團隊想逐漸實施插件化開發,Small是個不錯的選擇!

官網位址:http://code.wequick.net/Small/cn/cases

github https://github.com/wequick/Small

作者:wequick 團隊

使用:

buildscript  {
    dependencies {
        classpath 'net.wequick.tools.build:gradle-small:1.2.0-alpha6'
    }
}

apply plugin: 'net.wequick.small'

small {
    aarVersion = '1.2.0-alpha6'
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

84.JsBridge

一句話介紹:一款提供WebView和Javascript通信能力的架構

上榜理由:該架構提供給了允許H5頁面調用通過JS調用App方法的能力;3.1K個star,簡潔的通訊方式,值得每一個Web\Hybrid App開發者嘗試

gtihub https://github.com/lzyzsd/JsBridge

作者:hi大頭鬼hi

使用:

repositories {
    // ...
    maven { url "https://jitpack.io" }
}

dependencies {
    compile 'com.github.lzyzsd:jsbridge:1.0.4'
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

85.richeditor-android

一句話介紹:一款強大的富文本編輯架構

上榜理由:2.8k個star,榜單裡第一個為TextView提供擴充能力的架構,你暫時不需要它,但不能不知道它

github https://github.com/wasabeef/richeditor-android

作者:Daichi Furiya

使用:

repositories {
    jcenter()
}

dependencies {
    compile 'jp.wasabeef:richeditor-android:1.2.2'
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

86.Transitions-Everywhere

一句話介紹:一款教你正确使用Transitions API(Android 轉場動畫API)的教學型項目

上榜理由:你可能還未嘗試過Android API的Transitions 架構,可能聽過,但卻無法做出優雅奇妙的動效——别擔心,Transitions-Everywhere正如它的名字一樣,它将帶你全面體驗Transitions 的強大之處

github https://github.com/andkulikov/Transitions-Everywhere

作者:Andrey Kulikov

使用:

dependencies {
    compile "com.andkulikov:transitionseverywhere:1.7.4"
}           
  • 1
  • 2
  • 3

87.android-viewbadger

一句話介紹:能夠快速的為Android 視圖加入“勳章”能力的架構

上榜理由:如果說勳章一詞聽起來陌生,那麼顯 示已讀未讀個數、小紅點标記資訊這一類詞語你一定不太陌生,筆者相信在諸位實際開發中經常遇到為某些item加入小紅點标記的需求,聰明的各位一定有着各 種實作方案,為什麼不能快速優雅的完成呢?android-viewbadger可以幫你實作,當然,在某些情況下,你需要具備修改源碼的能力,以符合設 計MM的需求!值得注意的是,這寬項目已經五年沒有更新了!

github https://github.com/jgilfelt/android-viewbadger

作者:Jeff Gilfelt

使用:

clone源碼到本地

View target = findViewById(R.id.target_view);
BadgeView badge = new BadgeView(this, target);
badge.setText("1");
badge.show();           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

88.AndroidWiFiADB

一句話介紹:一款不用資料線也可以讓你調試手機裝置APP的插件項目

上榜理由:你是否還在擔心測試過程中高強度的拔插資料線對手機電池和USB端口造成終生難以彌補的損害?别擔心,有wifi有AndroidWiFiADB,無須資料線也可以調試應用了,更有趣的是,在測試工程師一邊拿着手機一邊找你聊bug的時候,你已經偷偷在它的手機上修複了bug,深藏功與名!

github https://github.com/pedrovgs/AndroidWiFiADB

作者:Pedro Vicente Gómez Sánchez

使用:

Preferences/Settings->Plugins->Browse Repositories->serch AndroidWiFiADB           
  • 1

89.emojicon

一句話介紹:一款提供在TextView、EdiText展示表情包能力的架構

上榜理由:2.7k個star,,榜單第二款增強TextView顯示能力的架構,這款專為表情包設計,如果你曾經好奇微信、QQ的表情顯示是如何做到的?這款架構一定能滿足你的求知欲。

90.packer-ng-plugin

一句話介紹:一款打爆工具插件

上榜利用:筆者盡力維護榜單涉及範圍的全面性,是以引入此插件項目——項目号稱完成100個管道包隻需要10秒鐘,在市面上各種各樣多管道打包方案的今天,選擇一款适合自己團隊的,才是上上選擇

github https://github.com/mcxiaoke/packer-ng-plugin

作者:Xiaoke Zhang

使用:

buildscript {
    ......
    dependencies{
    // add packer-ng
        classpath 'com.mcxiaoke.gradle:packer-ng:1.0.9'
    }
}            
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
apply plugin: 'packer' 

dependencies {
    compile 'com.mcxiaoke.gradle:packer-helper:1.0.9'
} 

 android {
    //...
    signingConfigs {
      release {
          // 滿足下面兩個條件時需要此配置
          //  Gradle版本 >= 
          //  Android Gradle Plugin 版本 >= 
          // 作用是隻使用舊版簽名,禁用V2版簽名模式
        v2SigningEnabled false 
      }
    }
  }           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21

91.android-priority-jobqueue

一句話介紹:一款提供背景任務管理能力的架構

上榜理由:如果你是個志在深入研究多線程操作 的開發者,這個項目一定不要錯過,不論是Activity重新加載、Service使用線程池時的任務優先級和并發問題,都不要擔心,Job Manage會照顧優先級,持久性,負載平衡,延遲,網絡控制,分組,2.4K個star,優秀的多線程管理能力,況且它依賴的第三方架構很少,值得你一 試

github https://github.com/yigit/android-priority-jobqueue

作者:Yigit Boyar

92.Android-Debug-Database

一句話介紹:一款提供測試App内部資料庫能力的架構

上榜理由:榜單裡第二款針對調試資料庫的架構,一行代碼內建,直接在浏覽器增删改查App的資料庫,2.3k個star,心動不如行動!

github https://github.com/amitshekhariitbhu/Android-Debug-Database

作者:AMIT SHEKHAR

使用:

debugCompile 'com.amitshekhar.android:debug-db:1.0.0'           
  • 1

浏覽器鍵入

http://XXX.XXX.X.XXX:           
  • 1

93.conceal

一句話介紹:一款facebook提供的加密本地大檔案的架構

上榜理由:如果還在擔心App内的圖檔的隐私問題,這款facebook提供的檔案加密架構足以解決你的問題,facebook用戶端的圖檔和資料都是使用conceal加密的

官網位址:http://facebook.github.io/conceal/

github https://github.com/facebook/conceal

作者;facebook

使用:

clone項目到本地/官網下載下傳jar

94.ARouter

一句話介紹:一款提供服務、頁面跳轉路由的架構

上榜理由:正如作者宣稱的那樣,該架構提供:從外部URL映射到内部頁面、跨子產品的頁面跳轉(頁面解耦)、攔截跳轉過程等能力,還有更多功能等你去發掘,2.1K個star,值得為企業級的架構喝彩

github https://github.com/alibaba/ARouter

作者:alibaba

使用:

ndroid {
    defaultConfig {
    ...
    javaCompileOptions {
        annotationProcessorOptions {
        arguments = [ moduleName : project.getName() ]
        }
    }
    }
}

dependencies {
    // 替換成最新版本, 需要注意的是api
    // 要與compiler比對使用,均使用最新版可以保證相容
    compile 'com.alibaba:arouter-api:x.x.x'
    annotationProcessor 'com.alibaba:arouter-compiler:x.x.x'
    ...
}
// 舊版本gradle插件(< ),可以使用apt插件,配置方法見文末'其他#4'
// Kotlin配置參考文末'其他#5'           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

95.MagicaSakura

一句話介紹:一款提供多主題切換能力的架構

上榜理由:架構所提供的能力,一直是本榜單所看重的,這款由bilibili提供的多主題架構,作為榜單所涉及範圍能補充,1.9個star,感謝bilibili團隊所作出的貢獻!

github https://github.com/Bilibili/MagicaSakura

作者:Bilibili

使用:

compile 'com.bilibili:magicasakura:0.1.6@aar'           
  • 1

96.CustomActivityOnCrash

一句話介紹:一款當APP crash的時候自動載入某個Activity的架構(而不是顯示Unfortunately, X has stopped)

上榜理由:新奇的創意是榜單所需要的,是以它 赢得了1.8K個star;作為開發者應該擁有考慮到各種潛伏的bug的能力,但我們不能總是面面俱到,其他系統端的同僚也可能造成程式的意外 crash,是以,如何讓程式優雅的crash->重新開機值得我們思考,這款架構就提供了這種能力

github https://github.com/Ereza/CustomActivityOnCrash

作者:Eduard Ereza Martínez

使用:

dependencies {
    compile 'cat.ereza:customactivityoncrash:2.1.0'
}


添加到 Application class:           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
@Override
public void onCreate() {
    super.onCreate();

    CaocConfig.Builder.create()
        .backgroundMode(CaocConfig.BACKGROUND_MODE_SILENT) 
        .enabled(false) //default: true
        .showErrorDetails(false) //default: true
        .showRestartButton(false) //default: true
        .trackActivities(true) //default: false
        .minTimeBetweenCrashesMs() //default: 3000
        .errorDrawable(R.drawable.ic_custom_drawable) //default: bug image
        .restartActivity(YourCustomActivity.class) //default: null (your app's launch activity)
        .errorActivity(YourCustomErrorActivity.class) //default: null (default error activity)
        .eventListener(new YourCustomEventListener()) //default: null
        .apply();
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17

97.XhsEmoticonsKeyboard

一句話介紹:最開心的開源表情解決方案

上榜理由:如果你還在發愁如何為你的APP自制鍵盤,那麼此架構非常适合你,而且還提供表情包展示能力,1.7個star證明了它的獨特。此外作者還附贈了高仿微信鍵盤,QQ鍵盤的demo,分享給諸位

github https://github.com/w446108264/XhsEmoticonsKeyboard

作者:zhongdaxia

使用:

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}


dependencies { 
    compile 'com.github.w446108264:XhsEmoticonsKeyboard:2.0.4'
}           
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

98. Android-ObservableScrollView

一款讓視圖滑動更具有視覺效果的滑動式架構,在 GitHub 上提供了 12 種滑動效果,可以用來提升 App 的滑動體驗

GitHub 位址:https://github.com/ksoichiro/Android-ObservableScrollView

轉載位址:http://blog.csdn.net/angle0306/article/details/78900051