First Line of Code: Android (3rd Edition) cover

First Line of Code: Android (3rd Edition)

Rating 4.6
Chapters
17
Series
Turing Original
ISBN
9787115524836

Tags

Summary

First Line of Code: Android is an introductory and advanced tutorial for Android developers written by Guo Lin. Because it is systematic and progresses step by step, many developers regard it as the first book to read when learning Android. The 3rd edition is a comprehensive update of the 2nd edition based on Android 10.0: all topics have been adapted anew on Android 10.0, including system features such as notification channels and adaptive icons introduced in Android 8.0, the cleartext network traffic restriction in Android 9.0, and the dark theme in Android 10.0. The biggest change is that the development language has switched from Java to Kotlin. The first two editions assumed that readers had a Java background; this book instead devotes a dedicated chapter to explaining Kotlin syntax from scratch and then rewrites all sample code in Kotlin, so readers need no Kotlin background. The book has 16 chapters: Chapter 1 guides readers through setting up the development environment and running their first Android program; Chapters 3 to 12 explain Activity, UI layouts, Fragment, the broadcast mechanism, data persistence, ContentProvider, multimedia, Service, network programming, and Material Design in turn; Chapter 13 introduces Jetpack architecture components; Chapter 14 supplements common advanced techniques; Chapter 15 fully demonstrates the practical path of the MVVM architecture combined with Jetpack components by developing a weather forecast app; and Chapter 16 guides readers through writing and publishing the open-source library PermissionX. The whole book is driven by runnable code and comes with source code, mind maps, and PPT courseware. It is suitable both for Android beginners with no background reading in order and for experienced developers to consult as a reference.

Editor's review

这是一本少有的“能读完”的技术入门书。郭霖的写法几乎是站在初学者旁边一步步操作:先讲清为什么,再给出可运行代码,最后指出常见坑。前两版累计销量超过 25 万册,被多所高校选作教材,口碑基础相当扎实。 第 3 版的升级切中要害:开发语言全面转向 Kotlin,并新增一章 Kotlin 快速入门,读者不必先啃一遍 Java 才能上手;同时加入 Retrofit、协程、Jetpack、MVVM 等现代 Android 开发的核心内容,并把 Jetpack 单列一章、用一个天气预报 App 完整走通 MVVM 架构,避免了“学完组件却不会搭项目”的典型困境。第 16 章编写并发布开源库 PermissionX,更是少见的把“做开源”这件事讲进教材里的尝试。 随书提供源码、全书知识架构思维导图和 PPT 课件,自学与课堂教学都方便。需要提醒的是,本书基于 Android 10.0 写作,如今 Android 版本已迭代多代,部分系统特性和依赖版本需要结合官方文档更新理解,但它对四大组件、UI、网络、数据存储等底层概念的讲解并不过时。

Who it's for

A good fit for

  • 具备基本编程概念、想系统入门 Android 开发的学生与转行者
  • 会 Java 或已写过简单 App,希望转向 Kotlin 与 Jetpack 的开发者
  • 高校移动开发、Android 程序设计课程的师生,可作为教材使用
  • 需要一本案头参考、随时查阅 Android 基础知识的开发者

Not a good fit for

  • 完全没有任何编程经历、也没接触过面向对象语言的纯新手
  • 想深入 Android Framework 源码、系统底层或逆向方向的读者
  • 追求最新 Android 版本与最新工具链、只用官方文档的人

Reading tips

  1. 按章节顺序阅读,前 13 章跳过容易断链,尤其是第 2 章 Kotlin 不要略过。
  2. 务必动手敲代码,先跑通示例再改参数、加功能,比单纯阅读效率高得多。
  3. 阅读第 15、16 章实战时,先自己尝试搭结构,再对照书中实现找差距。
  4. 遇到因系统版本变化导致的报错,先查官方文档确认依赖与 API 现状,不要照搬老配置。

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. Preface
  2. Chapter 1 Setting Off: Your First Line of Android Code
  3. Chapter 2 Exploring a New Language: A Quick Introduction to Kotlin Programming
  4. Chapter 3 Starting with What You Can See: Exploring Activity
  5. Chapter 4 Software Needs Good Looks Too: All About UI Development
  6. Chapter 5 Balancing Phones and Tablets: Exploring Fragment
  7. Chapter 6 The Global Loudspeaker: A Detailed Explanation of the Broadcast Mechanism
  8. Chapter 7 The Complete Data Storage Solution: A Detailed Explanation of Persistence Techniques
  9. Chapter 8 Sharing Data Across Programs: Exploring ContentProvider
  10. Chapter 9 Enriching Your App: Using Phone Multimedia
  11. Chapter 10 The Silent Worker in the Background: Exploring Service
  12. Chapter 11 Seeing the Wonderful World: Using Network Technology
  13. Chapter 12 The Best UI Experience: Material Design in Practice
  14. Chapter 13 Advanced App Development Components: Exploring Jetpack
  15. Chapter 14 Continuing to Advance: Advanced Techniques You Should Also Master
  16. Chapter 15 Into Practice: Developing a Weather Forecast App
  17. Chapter 16 Writing and Publishing an Open-Source Library: PermissionX

FAQ

这本书需要先学 Java 吗?
不需要。第 3 版已全面改用 Kotlin,并在第 2 章从零讲解 Kotlin 语法,全书代码也是用 Kotlin 重写的。只要掌握基本的编程概念(变量、循环、函数、类),就可以直接开始阅读。
第 3 版和第 2 版有什么区别?
主要差别有三点:开发语言由 Java 改为 Kotlin 并新增 Kotlin 入门章节;系统基于 Android 10.0 重新适配,涵盖通知渠道、明文网络限制、深色主题等新特性;新增 Jetpack、协程、Retrofit、MVVM 等内容,并增加了天气预报 App 和 PermissionX 开源库两个实战章节。
现在 Android 版本更高了,这本书还适用吗?
书中的四大组件、UI、数据存储、网络等核心知识依然适用,但部分系统特性、依赖库版本和配置写法已随版本更新变化。建议边读边查官方文档,把书中示例当作理解原理的骨架,而非照抄的模板。
书里的代码和课件在哪里获取?
随书提供全书源代码、知识架构思维导图和 PPT 教学课件,通常可通过出版社或图灵教育的资源页面、书籍前言中的说明获取下载地址。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

About the author

郭霖 Author

Guo Lin: public information about this author is limited, and currently only one work is known, Interpersonal Communication and Public Expression, classified under inspirational growth. Judging from the title, the book concerns the transmission of information between people, the building of relationships, and the ability to speak in public settings, placing it in the practical writing category aimed at general readers. Works of this kind usually start from everyday interaction and workplace situations and discuss listening, wording, emotional awareness, and methods of speaking before an audience, in a style that tends to be plain, direct, and easy to apply rather than academically dense. On the available evidence, Guo Lin's writing centers on this theme of communication and expression, while details of the author's background, professional experience, and full body of work await further information. Readers interested in interpersonal skills and expression techniques may find this book a useful introductory reference on the topic.

More by the same author

Top rated in the same category