Android

Android Performance and Monitoring

Android performance and monitoring: profiling, memory, ANR, optimization, and diagnostic tools

13 면접 질문·
Senior
1

What is Android Profiler and what are its 4 modules?

답변

Android Profiler is a tool integrated into Android Studio that analyzes your app's real-time performance. It helps detect CPU, memory, network, and battery issues to optimize your app. Its 4 modules are: CPU Profiler (CPU usage and call traces), Memory Profiler (heap and allocations tracking), Network Profiler (network requests and bandwidth usage), and Energy Profiler (battery consumption and wake locks).

2

How does LeakCanary detect and report memory leaks in Android?

답변

LeakCanary is a library that automatically monitors objects expected to be garbage-collected (like a destroyed Activity or Fragment). If an object remains in memory when it shouldn't, LeakCanary detects the leak, analyzes the retention chain, and displays a notification with likely causes and the stack trace.

3

What is StrictMode in Android and what is it used for?

답변

StrictMode is a detection tool used to identify bad practices that might block the main thread, such as disk or network operations on the UI thread. It's usually enabled in development with StrictMode.setThreadPolicy() and StrictMode.setVmPolicy(), often wrapped in BuildConfig.DEBUG. When a violation is detected, it can log warnings, throw exceptions, or show alerts to help fix the issue before production.

4

What is the Layout Inspector in Android Studio and what is it used for?

5

What is Systrace in Android and what is it used for?

+10 면접 질문

다음 면접을 위해 Android을 마스터하세요

모든 질문, flashcards, 기술 테스트, 코드 리뷰 연습, 면접 시뮬레이터에 접근하세요.

무료로 시작하기