In the early stage of the interview, you need to calm down and rest impetuous (Android development must-see)~

foreword

When many Android developers are interviewed, they are always stumped by some questions, and afterwards they complain about the abnormal questions asked by the interviewer. In fact, I personally think that everyone has a different degree of mastery of basic knowledge. Some questions may be difficult for you, but others can answer them easily. Give it a firm hold.

Today's article is from a very senior senior's summary of Android basic interview questions. There are 100+ questions in total, with a wide range of knowledge, and the answers to each question are sorted out, but because the space is too long , only the interview questions are put here, and the answers are all organized into a document, so everyone can discuss together! ! !

Android interview finishing

1. What is ANR and how to avoid it?
2. What are the life cycles of Activity and Fragment?
3. The life cycle of Activity when switching between horizontal and vertical screens.
4. The defects and problems of AsyncTask, and talk about its principle.
5. onSaveInstanceState() and onRestoreInstanceState()
6. The priority of the process in android?
7. Why does Bunder transfer objects need to be serialized? What is the difference between Serialzable and Parcelable?
8. Animation
9. Context related
10. New features of each version of Android
11. Json
12. Which classes are there for parsing xml in android, and which one is officially recommended? And their principles and differences?
13. The difference between Jar and Aar
14. How much memory is allocated by Android for each application
15. How to update the UI
16. How to use ContentProvider.
17. Usage scenarios and characteristics of Thread, AsyncTask, and IntentService.
18. The role of Merge and ViewStub.
19. What is the difference between startActivity of activity and startActivity of context?
20. How to create a Dialog dialog box in Service?
21. What is the difference between the Asset directory and the res directory?
22. How does Android speed up the startup of Activity?
23. Handler mechanism
24. Can program A receive the broadcast of program B?
25. Data loading involves more pagination. How do you implement it?
26. When parsing json through Gson provided by Google, what are the rules for defining JavaBean?
27. What are the two differences in json parsing methods?
28. Knowledge about thread pool.
29. Memory leaks, how to find them, how to generate memory leaks?
30. What is the order of initialization of classes?
31. What is the structure of JSON?
32. How to set ViewPager usage details so that only the current Fragment is initialized each time, and the others are not initialized (reminder: Fragment lazy loading)?
33. Why did Android introduce Parcelable?
34. Have you tried to simplify the use of Parcelable?
35. What should I pay attention to when using Bitmap?
36. Can Oom try catch?
37. Have you ever encountered a multi-process scenario?
38. The calling timing of Canvas.save() and Canvas.restore()
39. Adding tables and deleting tables in database upgrades does not involve data migration, but modifying tables involves migrating original data.
40. Compile-time annotations are related to runtime annotations
41. Bitmap recycler related
42. Will strong references be set to null, will they be recycled?
43. Why does Bundle transfer data need to be serialized?
44. Is there a limit to the data transmitted by broadcasting, how much is it, and why should it be limited?
45. Do you understand hardware acceleration?
46. ​​ContentProvider authority management (separation of reading and writing, authority control - accurate to the table level, URL control).
47. Fragment state preservation
48. What is the difference between creating a thread directly in the Activity and creating a thread in the service?
49. How to calculate the size of the memory occupied by a Bitmap, and how to ensure that the loaded Bitmap does not cause memory overflow?
50. How to update the application? (Grayscale, mandatory update, regional update)
51. Please explain why Android needs to add a signature mechanism.
52. Why can bindService be linked with the Activity life cycle?
53. How to configure multi-channel package through Gradle?
54. How to communicate between activty and Fragmengt, and how to communicate between Fragmengt and Fragmengt?
55. Is custom view more efficient than xml definition? Explain why.
56. There are generally several types of broadcast registration, and what are the advantages and disadvantages of each?
57. There are generally several types of service startup, how to communicate between services and activty, and how to communicate between services.
58. The difference between ddms and traceView?
59. Causes of ListView freeze
60. The role and understanding of AndroidManifest
61. LaunchMode application scenarios
62. Talk about the relationship between Activity, Intent and Service
63. The difference between ApplicationContext and ActivityContext
64. The difference between Handler, Thread and HandlerThread
65. The principle of ThreadLocal
66. Calculate the nesting level of a view
67. MVP, MVVM, MVC explanation and practice
68. What is the difference between apply and commit of SharedPrefrences?
69. Are Base64 and MD5 encryption methods?
70. What is the difference between HttpClient and HttpConnection?
71. ActivityA jumps to ActivityB, and then B presses back to return to A. The order of their respective life cycles, A and B are opaque.
72. How to intercept and abort a text message through broadcast?
73. What is the difference between BroadcastReceiver and LocalBroadcastReceiver?
74. How to choose a third party, and what aspects should be considered?
75. Briefly talk about the process of accessing payment. Have you accessed the payment function yourself?
76. Singleton implements thread synchronization requirements
77. How to ensure that Service is not killed?
78. Tell me about the relationship between ContentProvider, ContentResolver and ContentObserver?
79. How to import an external database?
80. Performance comparison of LinearLayout, FrameLayout and RelativeLayout, why?
81. Scheme jump protocol
82. HandlerThread
83. IntentService
84. How to set an Activity as a window style.
85. Several ways of cross-process communication in Android
86. The difference between display Intent and implicit Intent
87. The concept of Android Holo theme and MD theme, and your opinion
88. How to make the program start automatically?
89. The life cycle of Fragment in ViewPager, the change of Fragment's life cycle when sliding the page of ViewPager.
90. How to view the SP and SQList files in the simulator. How to visualize layout nesting layers and loading time.
91. The packaging and launching process and review time of major platforms, common problems (3-4 in the mainstream application market) 92.
What are the processing skills of screen adaptation?
93. Understanding of dynamic layout
94. How to remove duplicate codes ?
95. The difference between Recycleview and ListView
96. Dynamic permission adaptation scheme, the concept of permission group
97. Why does the Android system design ContentProvider?
98. Does the pull-down status bar affect the life cycle of the activity
? 99. If a network request is made during onStop, how to restore it during onResume?
100. The difference between Debug and Release states
101. What is dp, and what is the difference between sp
? 102. Customize View, ViewGroup and pay attention to those callbacks?
103. The storage type in android
104. The life cycle of Activity, will other life cycles go after the finish call?
105. What screen and resource adaptation problems have you encountered?
106. What difficulties did you encounter in the project, and how did you finally solve them?
107. The principle and solution of listview image loading disorder.
108. The difference and use of invalidate and requestLayout.
109. How to decompile and reverse code analysis.
110. RemoteViews implementation and usage scenarios
111. Handling of many error codes on the server (there are tens of thousands of error codes)
112. Commonly used adb command lines
113. How to check the recycling status of an object in Android?
114. The life cycle of Activity under normal and abnormal conditions
115. About the usage scenarios of < include >< merge >< stub >
116. What is the new container class introduced by Android after optimizing HashMap?
117. Talk about your understanding of services and how to kill a service.
118. Realization of resumable upload?

epilogue

What the interviewer interviews depends entirely on their personalities (character, mood, weather, your appearance). The above are just some important points that I think are important. Of course, there are many deep things that cannot be filled in a short period of time. My usual experience accumulation. The interview is not only about the technical aspect, but also the high-level and personnel aspects, all of which depend on the individual's performance.

PS:如果面试官说,还有什么想问的,千万不要给自己挖坑,说今天自己表现怎样,能不能被录取。要往公司的团队,氛围去问,尽量表现的对公司有兴趣。

For example: I want to know whether the company holds technical meetings regularly, whether old employees will share some of their experiences, etc.

How well you prepare your knowledge directly determines whether you can successfully pass the first and second interviews, so you need to sort out your knowledge before the interview, and judge the weaknesses of your skills from yourself. Is there any need to make up for it! ! !

After the knowledge is sorted out, it is necessary to check and fill in the gaps. Therefore, for these knowledge points, I also prepared a lot of e-books and note study documents on hand. These notes perfectly summarize each knowledge point (contains a lot of content ) : Android foundation, Java foundation, Android source code related analysis, some common principle problems, etc. ):https://qr18.cn/CgxrRy

Next, list some points to pay attention to in the interview :

  • smiling, polite, humble
  • Dress decently, 80% of ggs wear slippers
  • Be sure to bring your resume and pen
  • Come to say thank you, say thank you after the interview
  • Learn to read the interviewer's expression, if the answer is not good, don't continue to talk
  • Don't brag about how awesome your previous projects are, and don't brag
  • Answer the questions calmly, don't talk a lot in one round, the interviewer is very annoying

Finally, I wish you a smooth interview and find your favorite company as soon as possible.

Guess you like

Origin blog.csdn.net/weixin_61845324/article/details/132175346