mb612648928888e 2021-09-19 15:26:37 阅读数:308
Android面試題包括Android基礎,還有一些源碼級別的、原理這些等。所以想去美團面試,一定要多看看源碼和實現方式,常用框架可以試試自己能不能手寫實現一下,鍛煉一下自己。 (一)Android基礎知識點
四大組件是什麼
四大組件的生命周期和簡單用法
Activity之間的通信方式
Activity各種情况下的生命周期
橫豎屏切換的時候,Activity 各種情况下的生命周期
Activity與Fragment之間生命周期比較
Activity上有Dialog的時候按Home鍵時的生命周期
兩個Activity 之間跳轉時必然會執行的是哪幾個方法?
前臺切換到後臺,然後再回到前臺,Activity生命周期回調方法。彈出Dialog,生命值周期回調方法。
Activity的四種啟動模式對比
Activity狀態保存於恢複
fragment各種情况下的生命周期
Fragment狀態保存startActivityForResult是哪個類的方法,在什麼情况下使用?
如何實現Fragment的滑動?
fragment之間傳遞數據的方式?
Activity 怎麼和Service 綁定?
怎麼在Activity 中啟動自己對應的Service?
service和activity怎麼進行數據交互?
Service的開啟方式
請描述一下Service 的生命周期
談談你對ContentProvider的理解
說說ContentProvider、ContentResolver、ContentObserver 之間的關系
請描述一下廣播BroadcastReceiver的理解
廣播的分類
廣播使用的方式和場景
在manifest 和代碼中如何注册和使用BroadcastReceiver?
本地廣播和全局廣播有什麼差別?
BroadcastReceiver,LocalBroadcastReceiver 區別
AlertDialog,popupWindow,Activity區別
Application 和 Activity 的 Context 對象的區別
Android屬性動畫特性
如何導入外部數據庫?
LinearLayout、RelativeLayout、FrameLayout的特性及對比,並介紹使用場景。
談談對接口與回調的理解
回調的原理
寫一個回調demo
介紹下SurfView
RecycleView的使用
序列化的作用,以及Android兩種序列化的區別
差值器
估值器
Android中數據存儲方式
(二)Android源碼相關分析
Android動畫框架實現原理
Android各個版本API的區別
Requestlayout,onlayout,onDraw,DrawChild區別與聯系
invalidate和postInvalidate的區別及使用
Activity-Window-View三者的差別
談談對Volley的理解
如何優化自定義View
低版本SDK如何實現高版本api?
描述一次網絡請求的流程
HttpUrlConnection 和 okhttp關系
Bitmap對象的理解
looper架構
ActivityThread,AMS,WMS的工作原理
自定義View如何考慮機型適配
自定義View的事件
AstncTask+HttpClient 與 AsyncHttpClient有什麼區別?
LaunchMode應用場景
AsyncTask 如何使用?
SpareArray原理
請介紹下ContentProvider 是如何實現數據共享的?
AndroidService與Activity之間通信的幾種方式
IntentService原理及作用是什麼?
說說Activity、Intent、Service 是什麼關系
ApplicationContext和ActivityContext的區別
SP是進程同步的嗎?有什麼方法做到同步?
談談多線程在Android中的使用
進程和 Application 的生命周期
封裝View的時候怎麼知道view的大小
RecycleView原理
AndroidManifest的作用與理解
(三)常見的一些原理性問題
Handler機制和底層實現
Handler、Thread和HandlerThread的差別
handler發消息給子線程,looper怎麼啟動?
關於Handler,在任何地方new Handler 都是什麼線程下?
ThreadLocal原理,實現及如何保證Local屬性?
請解釋下在單線程模型中Message、Handler、Message Queue、Looper之間的關系
請描述一下View事件傳遞分發機制
Touch事件傳遞流程
事件分發中的onTouch 和onTouchEvent 有什麼區別,又該如何使用?
View和ViewGroup分別有哪些事件分發相關的回調方法
View刷新機制
View繪制流程
自定義控件原理
自定義View如何提供獲取View屬性的接口?
Android代碼中實現WAP方式聯網
AsyncTask機制
AsyncTask原理及不足
如何取消AsyncTask?
為什麼不能在子線程更新UI?
ANR產生的原因是什麼?
ANR定比特和修正
oom是什麼?
什麼情况導致oom?
有什麼解决方法可以避免OOM?
Oom 是否可以try catch?為什麼?
內存泄漏是什麼?
什麼情况導致內存泄漏?
如何防止線程的內存泄漏?
內存泄露場的解决方法
內存泄漏和內存溢出區別?
LruCache默認緩存大小
ContentProvider的權限管理(解答:讀寫分離,權限控制-精確到錶級,URL控制)
如何通過廣播攔截和abort一條短信?
廣播是否可以請求網絡?
廣播引起anr的時間限制是多少?
計算一個view的嵌套層級
Activity棧
Android線程有沒有上限?
線程池有沒有上限?
Android為什麼引入Parcelable?
有沒有嘗試簡化Parcelable的使用?
熟練掌握java是很關鍵的,大公司不僅僅要求你會使用幾個api,更多的是要你熟悉源碼實現原理,甚至要你知道有哪些不足,怎麼改進,還有一些java有關的一些算法,設計模式等等。 (一、)Java
HashMap 和 HashTable 以及 CurrentHashMap 的區別。
synchronized 和 volatile 、ReentrantLock 、CAS 的區別。
JVM 類加載機制、垃圾回收算法對比、Java 虛擬機結構等。
Java 的四大引用
Java 的泛型,<? super T> 和 <? extends T> 的區別。
Java 線程有哪些狀態,有哪些鎖,各種鎖的區別。
final 、finally、finalize 區別。
接口和抽象類的區別。
sleep 、wait、yield 的區別,wait 的線程如何喚醒它?
一、圖片
<pre spellcheck=“false” class=“md-fences md-end-block ty-contain-cm modeLoaded” lang=“undefined” cid=“n278” mdtype=“fences” style=“box-sizing: border-box; overflow: visible; font-family: var(–monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;”>1、圖片庫對比
2、LRUCache原理
3、圖片加載原理
4、自己去實現圖片庫,怎麼做?
5、Glide源碼解析
6、Glide使用什麼緩存?
7、Glide內存緩存如何控制大小?</pre>
二、網絡和安全機制
<pre spellcheck=“false” class=“md-fences md-end-block ty-contain-cm modeLoaded” lang=“css” cid=“n283” mdtype=“fences” style=“box-sizing: border-box; overflow: visible; font-family: var(–monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;”>1.網絡框架對比和源碼分析
2.自己去設計網絡請求框架,怎麼做?
3.網絡請求緩存處理,okhttp如何處理網絡緩存的
4.從網絡加載一個10M的圖片,說下注意事項
5.TCP的3次握手和四次揮手
6.TCP與UDP的區別
7.TCP與UDP的應用
8.HTTP協議
9.HTTP1.0與2.0的區別
10.HTTP報文結構
11.HTTP與HTTPS的區別以及如何實現安全性
12.如何驗證證書的合法性?
13.https中哪裏用了對稱加密,哪裏用了非對稱加密,對加密算法(如RSA)等是否有了解?
14.client如何確定自己發送的消息被server收到?
15.談談你對WebSocket的理解
16.WebSocket與socket的區別
17.談談你對安卓簽名的理解。
18.請解釋安卓為啥要加簽名機制?
19.視頻加密傳輸
20.App 是如何沙箱化,為什麼要這麼做?
21.權限管理系統(底層的權限是如何進行 grant 的)?</pre>
三、數據庫
<pre spellcheck=“false” class=“md-fences md-end-block ty-contain-cm modeLoaded” lang=“css” cid=“n288” mdtype=“fences” style=“box-sizing: border-box; overflow: visible; font-family: var(–monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;”>1.Sqlite昇級,增加字段的語句
2.數據庫框架對比和源碼分析
3.數據庫的優化
4.數據庫數據遷移問題</pre>
四、插件化、模塊化、組件化、熱修複、增量更新、Gradle
<pre spellcheck=“false” class=“md-fences md-end-block ty-contain-cm modeLoaded” lang=“undefined” cid=“n293” mdtype=“fences” style=“box-sizing: border-box; overflow: visible; font-family: var(–monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;”>1.對熱修複和插件化的理解
2.插件化原理分析
3.模塊化實現(好處,原因)
4.熱修複、插件化
5.項目組件化的理解
6.描述清點擊 Android Studio 的 build 按鈕後發生了什麼</pre>
五、架構設計和設計模式
<pre spellcheck=“false” class=“md-fences md-end-block ty-contain-cm modeLoaded” lang=“undefined” cid=“n298” mdtype=“fences” style=“box-sizing: border-box; overflow: visible; font-family: var(–monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;”>1.談談你對Android設計模式的理解
2.MVC MVP MVVM原理和區別
3.你所知道的設計模式有哪些?
4.項目中常用的設計模式
5.手寫生產者/消費者模式
6.寫出觀察者模式的代碼
7.適配器模式,裝飾者模式,外觀模式的异同?
8.用到的一些開源框架,介紹一個看過源碼的,內部實現過程。
9.談談對RxJava的理解
10.Rxjava發送事件步驟
11.RxJava的作用,與平時使用的异步操作來比的優缺點
12.說說EventBus作用,實現方式,代替EventBus的方式
13.從0設計一款App整體架構,如何去做?
14.說一款你認為當前比較火的應用並設計(比如:直播APP,P2P金融,小視頻等)
15.談談對java狀態機理解
16.Fragment如果在Adapter中使用應該如何解耦?
17.Binder機制及底層實現
18.對於應用更新這塊是如何做的?(解答:灰度,强制更新,分區域更新)?
19.實現一個Json解析器(可以通過正則提高速度)
20.統計啟動時長,標准</pre>
六、性能優化
<pre spellcheck=“false” class=“md-fences md-end-block ty-contain-cm modeLoaded” lang=“css” cid=“n303” mdtype=“fences” style=“box-sizing: border-box; overflow: visible; font-family: var(–monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;”>1.啟動 app 黑白屏優化
2.穩定——內存優化
3.流暢——卡頓優化
4.節省——耗電優化
5.安裝包——APK 瘦身
6.冷啟動與熱啟動
7.內存泄漏的場景和解决辦法
8. Bitmap 優化
9.LRU 的原理
10.webview 優化
11.如何避免 OOM?
…</pre>
七、Android Framework
<pre spellcheck=“false” class=“md-fences md-end-block ty-contain-cm modeLoaded” lang=“css” cid=“n308” mdtype=“fences” style=“box-sizing: border-box; overflow: visible; font-family: var(–monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;”>1.Android 系統架構
2.View 的事件分發機制?滑動沖突怎麼解决?
3.View 的繪制流程?
4.跨進程通信
5.Android 系統啟動流程是什麼?
6.啟動一個程序,可以主界面點擊圖標進入,也可 以從一個程序中 跳轉過去,二者有什麼區別?
7.AMS 家族重要術語解釋
8.用到的一些開源框架,介紹一個看過源碼的,內部實現過程。
…</pre>
八、Android優秀三方庫源碼
<pre spellcheck=“false” class=“md-fences md-end-block ty-contain-cm modeLoaded” lang=“undefined” cid=“n313” mdtype=“fences” style=“box-sizing: border-box; overflow: visible; font-family: var(–monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;”>1.網絡底層框架:OkHttp 實現原理
2.網絡封裝框架:Retrofifit 實現原理
3.響應式編程框架:RxJava 實現原理
4.圖片加載框架:Glide 實現原理
5.事件總線框架:EventBus 實現原理
6.內存泄漏檢測框架:LeakCanary 實現原理
7.依賴注入框架:ButterKnife 實現原理
8.依賴全局管理框架:Dagger2 實現原理
9.數據庫框架:GreenDao 實現原理</pre>
希望本文對你有所啟發,有任何面試上的建議也歡迎留言分享給大家。
好了,今天的分享就到這裏,如果你對在面試中遇到的問題,或者剛畢業及工作幾年迷茫不知道該如何准備面試並突破現狀提昇自己,對於自己的未來還不够了解不知道給如何規劃,來看看同行們都是如何突破現狀,怎麼學習的,來吸收他們的面試以及工作經驗完善自己的之後的面試計劃及職業規劃。
CodeChina開源項目:《Android學習筆記總結+移動架構視頻+大廠面試真題+項目實戰源碼》
好了~如果你看到了這裏,覺得文章寫得不錯就給個贊唄?如果你覺得那裏值得改進的,請給我留言。一定會認真查詢,修正不足。謝謝。
為什麼某些人會一直比你優秀,是因為他本身就很優秀還一直在持續努力變得更優秀,而你是不是還在滿足於現狀內心在竊喜!希望讀到這的您能點個小贊和關注下我,以後還會更新技術幹貨,謝謝您的支持!
版权声明:本文为[mb612648928888e]所创,转载请带上原文链接,感谢。 https://gsmany.com/2021/09/20210919152636556L.html