Transferred from: Http://gityuan.com/2016/04/24/how-to-study-android/
See a lot of people ask the non-training how to learn programming, in fact, the basic study by self-education. There is a word called "Master to the door to practice by personal," and then the great teacher can teach you things are very limited, the real practice or to rely on their own. I majored in mathematics, although graduate students are computer majors, but graduate students are often doing research work, and will not touch programming so basic things, about programming related I rely on self-study. For Android this piece, is to participate in the work also begins to contact, starts to learn by oneself.
Learning level, many people are often divided into introductory, primary, middle. Level of ashes and so on. This is simply divided into two levels: basic and advanced. In addition, all the books involved in this article are Gityuan in the course of learning the more classical books, only recommended to everyone.
First, the basic article
Reading attitude: Learning process is often we need to read, online a search, often there will be a big push book recommended to everyone to read, face so many books, how to choose, how to read, for the same level of books to choose a book, the rest of the rough time, skimming can, much the same, for intensive reading books need to read repeatedly.
1.1 Java Chapter
Java is the basis of Android, it is recommended that beginners must first learn the basic knowledge of Java, and then learn Android, gradually, not impatient, only a solid foundation to build a solid superstructure.
Java Books
- Thinking in Java: The Chinese version of the Java programming idea, this is a very classic Java books, many people say that this book is not suitable for beginners, I remember the first book I read the Java book is this book. Read the first time on the overall understanding of Java, but a lot of details do not fully understand, check the resources and looked at the second time, Java has a deeper understanding. After some time later, the ability has also improved, and then picked up the book and looked at the third time, found opposite to the object has a deeper understanding, this book is suitable for repeated reading.
- Effective Java:java Advanced Book, this book in the "article" way to expand, always put forward 78 Java specific recommendations, the Java platform for the subtleties of the unique insight, but also provide excellent code examples. As a Java advanced book, it's a great boon for Java level improvements.
- Java Concurrency in practice: The Chinese version of "Java Concurrency Programming Combat", the book uses a gradual approach, from the basic theory of concurrent programming, and then the structure of concurrent applications, performance and testing, and finally the explicit lock, atomic variables, non-blocking algorithm these advanced topics. This piece of Java concurrency is a great book.
- Java performance: The Chinese version of the Java Performance Optimization Authority guide, Java's father James Gosling recommended a Java Application performance optimization of the classic, including the algorithm structure, memory, I/O, disk usage, the content is easy to understand, A number of monitoring and measurement tools are also introduced. About optimization is a deep field, after Java has a certain foundation, it is necessary to understand the look.
Java Virtual machine, which is an advanced Java master must have some understanding:
- The Java Language specification, official Java document (English version)
- The Java®virtual Machine specification, official JVM documentation (English version)
- In-depth understanding of Java Virtual machines: This is a very comprehensive book about Java virtual machines, from Java GC to Java Virtual machine internal implementation and optimization strategy, as a Java expert is worth a look at the book.
The focus of this article is on how to learn Android, so let's put Java basics and advanced books into the basics of Android learning. As an Android developer, there is absolutely no need to start with Java understanding so deep, only to see one or two Java basic Books, master Java object-oriented idea of the core meaning that all things are objects, Master Java Basic Grammar, basic can open the learning path of Android. After the follow-up to Android also have a certain understanding, and then slowly continue to improve the Java and Android level.
Have a friend private messages I think this Java book is a bit more difficult, it may be I read Java books, but also read a little C and C + + for the sake of the book, so read the first book "Java Programming thought." If you are really 0 basic, first contact programming, want to use Java as your introductory language, then you can first look at the Java Language Program design (Basic) or "Java from the beginning to mastery," as a beginner to master Java Basic Grammar, usually encountered unfamiliar methods, View the API documentation more slowly and become familiar with it.
1.2 Android Basic article
With a certain Java Foundation (no need to be proficient in Java), you can start getting started with Android. If you are a beginner Android, be sure to build your own development environment first and prepare your JDK and Android studio environment. The process of reading, while looking at the knowledge point while writing a sample program, one to deepen the impression, and improve the ability to do.
- "Crazy Android Handout": Author Li Gang, this is the first Android book I have seen, there is a third version, I was looking at the second edition based on Android 4.2, the book has a large number of examples, I remember that at that time every instance of reading followed the knock again, It took about a week to read the book and knock out most of the example code.
- The first line of code: Author Guo Lin, many people on the Internet have recommended this book as an introduction to Android, but I did not read it. This is Turing series books, the previous time Turing's editor saw my blog gityuan.com, and then contacted me to ask if there is interest in the book, I mentioned Guo Lin "The first line of code" is also their press launch, and then sent me a copy. I probably swept the book, the content is indeed relatively basic, the author is good, the book is also interspersed with a lot of strange rise experience upgrade fragments, more fun, beginners can see.
Android Basic Books, only one or two, no need to see too many basic books, different abilities should have different pursuit, here is no longer introduce other basic books. In addition, the Android development process always requires a variety of development environment, tools, download, and then recommend a good site androiddevtools.cn, collect and organize the Android development, design and other related tools of the large collection, very comprehensive, and the speed is good oh, The most important is to download the latest tools without FQ.
Have a friend curious private messages whether I will be out of the book, there is no relevant plans, the ability is not as many predecessors, but also to deepen the internal strength of the cultivation, their own learned to write a blog, but also ask you a lot of advice!
1.3 Android Firsthand
What is Android data? That is the official information given by Google, which is often the English version, the nutritional value is very high. In fact, as long as you do not have English +FQ tools, we strongly recommend that you directly look at the information of the Android website, do not be intimidated by English, because many professional names, we see the name of Activity/service such as the code name itself is English, the rest of the very basic grammar, Do not understand can be translated at any time, I generally use Chrome browser +google translation plug-in, where does not point where, mother no longer have to worry about my English.
Anyway, if you can read and understand the following, then you can absolutely not need to read the previous books, and Android has been quite familiar with.
- Developer.android.com:Android Development website, the following list of commonly used information:
- Android training:android Training documentation;
- In addition, the Chinese version of the Android training course was launched by Hu, and the official documents were translated;
- Android API guide: Android components, manifest configuration files, animations/images and other related introduction;
- Android Tools: Performance, testing, Android Studio and other tool documentation;
- Source.android.com: Introduction of Android Open source code related content;
- Android Performance patterns:2015 The Android performance optimized video that Google has released on YouTube for the 4th quarter.
- The domestic Google organization, Youku released the corresponding (Chinese) Android performance mode fourth season;
- In addition, Hu launched the Android performance Optimization Model Chinese version of the document, the official video translation and collation;
- Android-developers.blogspot.com:android Official blog, there are some relatively good feature, blog will be the first time to present.
1.4 Android Resource Grooming
Here, you already have the ability to develop apps. Usually need to do more than write their own app, but also to see how others excellent app is written, the following list some open source libraries, tools and apps:
- Android-arsenal.com: Author Vbauer collects various open source libraries and tools in GitHub, and provides search function, which is the most comprehensive library in foreign countries.
- Android Open Source project summary: The author trinea the various open source library, is the most comprehensive library in the country;
- Codekk Open Source project source code Analysis: From the source point of view, analysis of Android's more popular open-source framework;
- Codota.com: This is a code search engine that collects excellent sample Java code for various APIs.
Of course there are a lot of good blogs and websites worth recommending ...//todo
Second, advanced article
As a programmer, not to read the source code, just look at the API document, only floating on the surface, which is far from enough. The real ability to exercise is to read the source code directly, not only to read the Andoid system source code, but also to read a variety of excellent open source Library.
2.1 Reading the importance of source code
Borrowed from the father of Linux Linus Torvalds a famous saying: Read the fucking source code. Whether it is reading andoid system source code or excellent open source framework, there will be a huge upgrade to the ability, first of all, can learn excellent code style and design ideas, can really "know it, but also need to know the reason why", can guide their own more flexible use of the API, To find the root cause of system bugs more quickly.
2.2 Reading the Source preparation
- Java Fundamentals: The upper framework and the app layer are all Java syntax;
- Basic C/C + +: Android's jni/native layer code adopts c++,linux.
- Linux:android Kernel Linux-based, understanding Linux-related knowledge is necessary to gain an in-depth grasp of Android.
- Git:android source code using git and repo to manage;
- Make:android source code using make system compiled, the source code system will see a lot of android.mk and other files;
- SOURCE Insight: This is absolutely look at the source of the artifact, can be in Java, C + +, C code between the seamless interface;
- Eclipse: Familiar with common shortcut keys, 工欲善其事 its prerequisite; Although the source insight is convenient, because of the familiarity with eclipse, for the framework Java layer of code, I am more accustomed to using eclipse, For native code and Linux code use source insight;
- Android Studio: This is Google's official support app development environment, about Android Studiod use tutorial;
- Google drawings: This is a drawing tool, and the articles in the Gityuan blog are done using Google drawing, such as the diagram in the binder's opening article.
- STARUML: This is a class diagram, and the class diagram and flowchart for Gityuan blog posts are done using STARUML, such as understanding the sequence diagram of the Android process creation process.
2.3 Read the source of the gesture
Read the source code is never from the source project in order to a file, from the first line to see the tail line. The correct and efficient reading of the source of the attitude should be a main line as the starting point, from the upper to the bottom, and constantly back, in the various modules, files, methods to jump back and forth, read repeatedly, to clarify the logic of the entire process. At the same time with thinking to see the source, try to speculate on the author's intentions, to understand the subtleties of the code, to think about the possible shortcomings of the code, to summarize the excellent code design ideas. Let's talk about the library that I am often involved in reading the Android source code process.
Read Android source code:
Here is my Android boot process as the main line, expand a series of articles on the android opening of a flowchart, in the company share when I have many thought process of the entire Android architecture, such as:
Click to view larger image
Android System source code
Android.googlesource.com:Google official source code, the domestic can not directly access, need to FQ, for a programmer to have FQ ability is extremely necessary. Android source contains a lot of libraries, listed below I look at the Android source code involved in more, but also more frequently read some of the library:
- Android/platform/packages/apps:android's own app, such as Email,camera, music, etc., is the main concern of the application Development Engineer directory;
- Android/platform/frameworks/base:java framework, which is the most viewed directory for framework engineers;
- Android/platform/frameworks/native:native framework;
- Android/platform/art:art virtual machine;
- Android/kernel/common:android Core, this is the driver engineer's most concerned about the module;
- Android/platform/system/core: Core system;
- Android/platform/libcore: Lib Library of the platform; In addition, for those who can't FQ, you can also download the Android source from the Android homepage on GitHub, which is timed to sync from Google's official source image.
2.4 Excellent resources
Newton once said: "If I see farther, because I stand on the shoulders of giants," This sentence is very practical value, after reading the introduction, you must not come up to the source of the world, careful you will enter the world of two times, in a chaotic state, the final collapse and even give up the road of knowledge, We must make reasonable use of the existing outstanding resources.
Android System Source Code Analysis
- Innost's Column
- Dengfanping's blog, the regulations in order to cover most of the Android system content;
- "In-depth understanding of Android" (Volume I, Volume II, Volume III)
- Lao Luo's Android tour
- Luo Shenyang's blog, introducing the Android system from all levels;
- "Android system source code scenario analysis"
- Gityuan Source Code Analysis
- For Dengfanping and Luo Shenyang two-bit seniors blogging based on Android 2.x or 4.x, Android has now developed to Android 6.0. No matter how Android changes, its core thinking changes are not very large, so two of the predecessors of the blog is worth learning and reference to the place. Then again, Android has undergone several iterations of the iteration, from the code structure to the overall logic still has a lot of changes. Bo Master plans to write a blog about the Android 6.0 source series.
- Gityuan as a rookie in the Android industry, the ability is not as many predecessors, but there is a willing to share the heart, there is an obsession with the quality of Android, there is a persistent attitude, has been and has been struggling on the road ...
2.5 Advanced Books
- Deep understanding of the Linux kernel
- Deep Linux kernel architecture
- Linux kernel design and implementation
- Linux device drivers
- Refactoring to improve the design of existing code
- Programming Zhu Ji Nanxiong (Volume 1, Volume 2)
- Design Patterns
- The Zen of design pattern
- Human Moon Myth
The first 4 books are all about Linux, if you do not need to engage in Linux-related development, just want to improve the understanding of Android as a whole, then only need to look at one or two, the Linux process, memory, IO and drivers have some knowledge of the CPU scheduling, interprocess communication is familiar with the basic can. In addition, there are many excellent books, here only to introduce/list the books I have read, is still looking at some excellent books, follow up and update.
Third, other
Finally, say more about the study of programming in the foreign chapter:
- Curiosity goes further than ambition: many people have a lot of ambition for the future, often less than the technology to have a curiosity, a desire to explore, coupled with a persistent person.
- Want to have open mentality: once I also just put their own thoughts of the clouds into their own cloud notes, very little finishing, this is actually not conducive to technological development, there should be more to tidy up their scattered knowledge points, feel good points can be taken out as a blog, it is a layer of ability to upgrade. In addition, in the bow to do technology at the same time, should also have empty head to see the world, not behind closed doors.
- Tiandaochouqin: Education can only represent the past, capacity represents the present, potential represents the future! You do not push yourself, you do not know how excellent, as long as the effort to learn, to tap the potential, and then improve self-technical training, the future is no longer a dream! Mutual encouragement!
- The way to solve the problem: encounter problems, we must first try to solve their own, can not solve to ask others. This is a exercise for themselves, but also a respect for others, there are many ways to search by themselves:
- Baidu, a lot of times or can help, do not overemphasize Google, completely abandon Baidu, after all, Chinese looks relatively fast;
- First Chinese keywords Google a bit, and then google the English keyword;
- Stackoverflow.com, know-how and other technical questions on the site directly search;
- View official documents;
- If there is source code, try to directly see the source code, see if it can be solved;
- Have time to visit GitHub more, look at Google official documents, more attention to the community, will reap a lot;
- Of course, the most important thing is to be able to calm down and persevere in the research of technology.
Tips: You can also go to my knowledge column how to self-study Android point of praise Support.
Welcome to follow my Weibo: Gityuan. If you feel that my article has all the help for you,
Please enjoy the support , or click below to share to more friends. Your support will inspire me to create more technical dry foods!
Turn from: How to teach yourself Android (highly recommended)