Android 面试的秘籍 - Android 面试常见问题及答案
# Android Interview Questions and Answers > Android Interview Questions and Answers - Your Cheat Sheet For Android Interview ### Prepared and maintained by the **Founder** of [Outcome School](https://outcomeschool.com): Amit Shekhar ## About me Hi, I am Amit Shekhar, Founder @ [Outcome School](https://outcomeschool.com) • IIT 2010-14 • I have taught and mentored many developers, and their efforts landed them high-paying tech jobs, helped many tech companies in solving their unique problems, and created many open-source libraries being used by top companies. I am passionate about sharing knowledge through open-source, blogs, and videos. You can connect with me on: - [X/Twitter](https://x.com/amitiitbhu) - [YouTube](https://www.youtube.com/@amitshekhar) - [LinkedIn](https://www.linkedin.com/in/amit-shekhar-iitbhu) - [GitHub](https://github.com/amitshekhariitbhu) ## Live session on "Android Developer Interview Preparation for Product-based Companies" I conducted a live session on "Android Developer Interview Preparation for Product-based Companies" Interacted with over **500 Android Developers**. Guided, motivated, and inspired them to aim higher and achieve more. **Recording Link**: https://www.youtube.com/watch?v=Yby0AA7ZSUE **Document Link**: https://docs.google.com/document/d/14UdD7Gd1j3no583ALx2t2Ggt3G_CECYhenLE-m-bkzA/edit?usp=sharing ## Contents - Android Interview Questions * [Android Interview Questions and Answers Playlist](#android-interview-questions-and-answers-playlist) * [Kotlin Coroutines](#kotlin-coroutines) * [Kotlin Flow API](#kotlin-flow-api) * [Kotlin](#kotlin) * [Android](#android) * [Android Libraries](#android-libraries) * [Android Architecture](#android-architecture) * [Design Pattern](#design-pattern) * [Android System Design](#android-system-design) and check [Android System Design Interviews](https://outcomeschool.com/blog/android-system-design-interviews) * [Android Unit Testing](#android-unit-testing) * [Android Tools And Technologies](#android-tools-and-technologies) * [Jetpack Compose](#jetpack-compose) * [Java](#java) * [Other Topics](#other-topics) * [Data Structures and Algorithms](#data-structures-and-algorithms) --- * **For Android Machine Coding Round Interview, Check**: [Android Machine Coding Round Interview](https://outcomeschool.substack.com/p/android-machine-coding-round-interview) --- ## I teach at Outcome School - [AI and Machine Learning](https://outcomeschool.com/program/ai-and-machine-learning) - [Android](https://outcomeschool.com/program/android) Join Outcome School and get a high-paying tech job: [Outcome School](https://outcomeschool.com) ## Fast-Track Android Interview Preparation: [Join Outcome School Android Program](https://outcomeschool.com/program/android) ### Android Interview Questions and Answers Playlist Watch this video on "Android Developer Interview Preparation for Product-Based Companies": [Android Developer Interview Preparation for Product-Based Companies](https://www.youtube.com/watch?v=Yby0AA7ZSUE) - **Question**: Android Push Notification Flow using FCM - **Answer**: [Android Push Notification Flow using FCM](https://www.youtube.com/watch?v=TrufwW4ILHg) - **Question**: What is an inline function in Kotlin? - **Answer**: [What is an inline function in Kotlin?](https://www.youtube.com/watch?v=GLLI8h67ryo) - **Question**: What is the advantage of using const in Kotlin? - **Answer**: [What is the advantage of using const in Kotlin?](https://www.youtube.com/watch?v=3G49ivVxfkU) - **Question**: What is a reified keyword in Kotlin? - **Answer**: [What is a reified keyword in Kotlin?](https://www.youtube.com/watch?v=kD2T84FnTck) - **Question**: Suspending vs Blocking in Kotlin Coroutines - **Answer**: [Suspending vs Blocking in Kotlin Coroutines](https://www.youtube.com/watch?v=V2lL_aJp17I) - **Question**: Retrofit vs OkHttp - **Answer**: [Retrofit vs OkHttp](https://www.youtube.com/watch?v=-6m2D2KTIpE) - **Question**: Launch vs Async in Kotlin Coroutines - **Answer**: [Launch vs Async in Kotlin Coroutines](https://www.youtube.com/watch?v=B4AfTPpCU5o) - **Question**: internal visibility modifier in Kotlin - **Answer**: [internal visibility modifier in Kotlin](https://www.youtube.com/watch?v=wOHpuf74-cI) - **Question**: open keyword in Kotlin - **Answer**: [open keyword in Kotlin](https://www.youtube.com/watch?v=bfpNDWNE6I0) - **Question**: lateinit vs lazy in Kotlin - **Answer**: [lateinit vs lazy in Kotlin](https://www.youtube.com/watch?v=IU2ZktdM-fo) - **Question**: What is Multidex in Android? - **Answer**: [What is Multidex in Android?](https://www.youtube.com/watch?v=R0zd8lmHnmE) - **Question**: How does the Android Push Notification system work? - **Answer**: [How does the Android Push Notification system work?](https://www.youtube.com/watch?v=810IFG2sWlc) - **Question**: How does the Kotlin Multiplatform work? - **Answer**: [How does the Kotlin Multiplatform work?](https://www.youtube.com/watch?v=nwfNh6Kd5hI) - **Question**: What is a ViewModel and how is it useful? - **Answer**: [What is a ViewModel and how is it useful?](https://www.youtube.com/watch?v=ORtieK5f_zg) - **Question**: Is it possible to force the Garbage Collection in Android? - **Answer**: [Is it possible to force Garbage Collection in Android?](https://www.youtube.com/watch?v=fPEjpFKo1-Q) - **Question**: What is a JvmStatic Annotation in Kotlin? - **Answer**: [What is a JvmStatic Annotation in Kotlin?](https://www.youtube.com/watch?v=qBBbOhY_pv4) - **Question**: init block in Kotlin - **Answer**: [init block in Kotlin](https://www.youtube.com/watch?v=cb3jOFozJns) - **Question**: JvmField Annotation in Kotlin - **Answer**: [JvmField Annotation in Kotlin](https://www.youtube.com/watch?v=bx8OZcMbeUE) - **Question**: singleTask launchMode in Android - **Answer**: [singleTask launchMode in Android](https://www.youtube.com/watch?v=WYkQEnm4jeI) - **Question**: Difference between == and === in Kotlin - **Answer**: [Difference between == and === in Kotlin](https://www.youtube.com/watch?v=lJtgxT2OIgQ) - **Question**: JvmOverloads Annotation in Kotlin - **Answer**: [JvmOverloads Annotation in Kotlin](https://www.youtube.com/watch?v=fHGsBV9Za8M) - **Question**: Why is it recommended to use only the default constructor to create a Fragment? - **Answer**: [Why is it recommended to use only the default constructor to create a Fragment?](https://www.youtube.com/watch?v=CitBt0FZFIc) - **Question**: Why do we need to call setContentView() in onCreate() of Activity class? - **Answer**: [Why do we need to call setContentView() in onCreate() of Activity class?](https://www.youtube.com/watch?v=U1aHAt7XC5I) - **Question**: When only onDestroy is called for an activity without onPause() and onStop()? - **Answer**: [When only onDestroy is called for an activity without onPause() and onStop()?](https://www.youtube.com/watch?v=B2kY_ckZa-g) ## Fast-Track Android Interview Preparation: [Join Outcome School Android Program](https://outcomeschool.com/program/android) ### Kotlin Coroutines Topics you should know in **Kotlin Coroutines** for Android Interview: * coroutines * suspend * launch, async-await, withContext * dispatchers * scope, context, job * lifecycleScope, viewModelScope, GlobalScope * suspendCoroutine, suspendCancellableCoroutine * coroutineScope, supervisorScope * runBlocking * Exception Handling Learn the above-mentioned from the following links: - [Master Kotlin Coroutines](https://outcomeschool.com/blog/kotlin-coroutines) - [Suspending vs Blocking in Kotlin Coroutines](https://www.youtube.com/watch?v=V2lL_aJp17I) - [Launch vs Async in Kotlin Coroutines](https://www.youtube.com/watch?v=B4AfTPpCU5o) - [Dispatchers in Kotlin Coroutines](https://outcomeschool.com/blog/dispatchers-in-kotlin-coroutines) - [coroutineScope vs supervisorScope](https://outcomeschool.com/blog/coroutinescope-vs-supervisorscope) - [suspend function in Kotlin Coroutines](https://outcomeschool.com/blog/suspend-function-in-kotlin-coroutines) - [Kotlin withContext vs Async-await](https://outcomeschool.com/blog/kotlin-withcontext-vs-async-await) - [CoroutineContext in Kotlin](https://outcomeschool.com/blog/coroutinecontext-in-kotlin) - [Callback to Coroutines in Kotlin](https://outcomeschool.com/blog/callback-to-coroutines-in-kotlin) - [Retrofit with Kotlin Coroutines](https://outcomeschool.com/blog/retrofit-with-kotlin-coroutines) - [Parallel Multiple Network Calls Using Kotlin Coroutines](https://outcomeschool.com/blog/parallel-multiple-network-calls-using-kotlin-coroutines) - [Room Database with Kotlin Coroutines](https://outcomeschool.com/blog/room-database-with-kotlin-coroutines) - [Unit Testing ViewModel with Kotlin Coroutines and LiveData](https://outcomeschool.com/blog/unit-testing-viewmodel-with-kotlin-coroutines-and-livedata) ### Kotlin Flow API Topics you should know in **Kotlin Flow API** for Android Interview: * Flow Builder, Operator, Collector * flowOn, dispatchers * Operators such as filter, map, zip, flatMapConcat, retry, debounce, distinctUntilChanged, flatMapLatest * Terminal operators * Cold Flow vs Hot Flow * StateFlow, SharedFlow, callbackFlow, channelFlow Learn the above-mentioned from the following links: - [Mastering Flow API in Kotlin](https://outcomeschool.com/blog/flow-api-in-kotlin) - [Creating Flow Using Flow Builder in Kotlin](https://outcomeschool.com/blog/creating-flow-using-flow-builder-in-kotlin) - [Terminal Operators in Kotlin Flow](https://outcomeschool.com/blog/terminal-operators-in-kotlin-flow) - [Cold Flow vs Hot Flow](https://outcomeschool.com/blog/cold-flow-vs-hot-flow) - [StateFlow and SharedFlow](https://outcomeschool.com/blog/stateflow-and-sharedflow) - [Long-running tasks in parallel with Kotlin Flow](https://outcomeschool.com/blog/long-running-tasks-in-parallel-with-kotlin-flow) - [Retry Operator in Kotlin Flow](https://outcomeschool.com/blog/retry-operator-in-kotlin-flow) - [Retrofit with Kotlin Flow](https://outcomeschool.com/blog/retrofit-with-kotlin-flow) - [Room Database with Kotlin Flow](https://outcomeschool.com/blog/room-database-with-kotlin-flow) - [Kotlin Flow Zip Operator for Parallel Multiple Network Calls](https://outcomeschool.com/blog/kotlin-flow-zip-operator-parallel-multiple-network-calls) - [Instant Search Using Kotlin Flow Operators](https://outcomeschool.com/blog/instant-search-using-kotlin-flow-operators) - [callbackFlow - Callback to Flow API in Kotlin](https://outcomeschool.com/blog/callback-to-flow-api-in-kotlin) - [Exception Handling in Kotlin Flow](https://outcomeschool.com/blog/exception-handling-in-kotlin-flow) - [Unit Testing ViewModel with Kotlin Flow and StateFlow](https://outcomeschool.com/blog/unit-testing-viewmodel-with-kotlin-flow-and-stateflow) ### Kotlin Android Interview Questions and Answers: * **15 Kotlin Interview Questions and Answers**: [Check the PDF](https://www.linkedin.com/posts/outcomeschool_kotlin-interview-questions-and-answers-activity-7276115620536954880-cFUa) * **What is the advantage of using const in Kotlin?** - [Video](https://www.youtube.com/watch?v=3G49ivVxfkU) and [Blog](https://outcomeschool.com/blog/const-in-kotlin) * **When to use lateinit keyword used in Kotlin?** - [Learn from here](https://outcomeschool.com/blog/lateinit-vs-lazy-in-kotlin) * **What is inline function in Kotlin?** - [Video](https://www.youtube.com/watch?v=GLLI8h67ryo) and [Blog](https://outcomeschool.com/blog/inline-function-in-kotlin) * **What are `companion objects` in Kotlin?** - [Learn from here](https://outcomeschool.com/blog/companion-object-in-kotlin) * **Extension functions** - [Learn from here](https://outcomeschool.com/blog/extension-function-in-kotlin) * **What is a data class in Kotlin?** - [Learn from here](https://outcomeschool.com/blog/data-class-in-kotlin) * **Remove duplicates from an array in Kotlin** - [Learn from here](https
暂无开放 Issues,或尚未同步最近议题。