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

First Line of Code: Android (3rd Edition)

Rating 4.6
Chapters
16
Series
First Line of Code: Android is a widely recommended introductory and advanced reader for Android developers in China. This third edition has been fully updated from the second edition based on Android 10.0: all knowledge points have been re-adapted to the Android 10.0 system, and all code has been rewritten in Kotlin. It also adds an introduction to Kotlin, coverage of new system features, and explanations of Jetpack architecture components. The book has 16 chapters, progressing in the order "environment setup—language basics—core components—UI and interaction—data and networking—architecture and practice." Chapter 1 walks readers through setting up a development environment and completing their first Android program; Chapter 2 offers a quick introduction to Kotlin programming; Chapters 3–11 systematically cover Activity, UI development, Fragment, the broadcast mechanism, data persistence, ContentProvider, multimedia, Service, and networking; Chapter 12 closes with a Material Design case study; Chapter 13 explains Jetpack architecture components in detail; Chapter 14 introduces advanced techniques; Chapter 15 guides readers through building a weather app with the MVVM architecture; and Chapter 16 explains how to write and publish an open-source library, PermissionX. The author, Guo Lin, is an Android software engineer and the creator of the open-source framework LitePal. He writes from a beginner's perspective, aiming for clarity and a gradual progression from easy to difficult. The book can therefore serve both as a main textbook for readers with no prior background to systematically learn Android development and as a handy reference manual during development.
ISBN
9787115524836

Tags

Summary

First Line of Code: Android is a widely recommended primer and advanced guide for Android developers in China. The third edition has been comprehensively updated from the second to align with Android 10.0, with every concept adapted for the Android 10.0 system. All code has been rewritten in Kotlin, and the book now includes an introduction to the Kotlin language, coverage of new system features, and guidance on using Jetpack architecture components.

The book comprises 16 chapters, progressing in the order of "environment setup—language fundamentals—core components—UI and interaction—data and networking—architecture and practice." Chapter 1 guides readers through setting up the development environment and building their first Android app. Chapter 2 provides a quick introduction to Kotlin programming. Chapters 3 through 11 systematically cover Activity, UI development, Fragment, the broadcast mechanism, data persistence, ContentProvider, multimedia, Service, and networking technologies. Chapter 12 concludes with a hands-on Material Design project, Chapter 13 delves into Jetpack architecture components, and Chapter 14 introduces advanced techniques. Chapter 15 walks readers through developing a weather forecast app using the MVVM architecture, and Chapter 16 explains how to write and publish the open-source library PermissionX.

The author, Guo Lin, is an Android software engineer and the creator of the open-source framework LitePal. Writing from a beginner's perspective, he aims for clarity and accessibility, gradually advancing from basic to more complex topics. As a result, the book serves both as a primary textbook for readers with no prior experience to systematically learn Android development and as a handy reference manual to consult during development.

Editor's review

市面上 Android 入门书不少,但能连续出到第3版、被大量高校选作教材的并不多。《第一行代码》最突出的优点有两个:一是「讲人话」,作者郭霖站在初学者视角写作,概念解释、代码节奏与示意图都围绕「看懂并跑通」设计;二是「跟得上」,第3版不是简单修订,而是基于 Android 10.0 全面重写,把开发语言从 Java 换成 Kotlin,并补上了 Jetpack、MVVM、Retrofit、协程等当下工程实践中的关键内容。 结构上,本书从搭建环境开始,几乎没有跳步地把 Activity、UI、Fragment、广播、数据存储、ContentProvider、多媒体、Service、网络逐一带过,最后用天气预报 App 和开源库 PermissionX 两个实战把知识串起来。每章都有可运行示例,读者可以边读边敲边验证。对于想系统入门 Android 的读者来说,这本书可以作为主线教材,再配合官方文档和真机调试使用,效果最佳。

Who it's for

A good fit for

  • 具备 Java 或 Kotlin 基础语法知识、想系统入门 Android 开发的初学者
  • 在校计算机相关专业学生,需要一本可当教材使用的 Android 课程参考书
  • 正在从其他方向转到移动端开发、希望快速补齐 Android 知识体系的开发者
  • 有一定 Android 经验、想系统梳理 Kotlin 与 Jetpack 用法的开发者

Not a good fit for

  • 完全没有编程基础、连变量与函数概念都不熟悉的读者
  • 希望直接学习 Flutter、React Native 等跨平台框架的读者
  • 只想查阅最新 Android 版本变更、不需要系统教程的资深工程师

Reading tips

  1. 务必边读边敲代码,每章至少亲手跑通一个示例,比只看书效率高得多
  2. 先补一点 Kotlin 语法再读第3章往后内容,第2章可作为速查回顾,不要跳过
  3. 第15章的天气预报 App 建议独立完成一遍,它是检验全书知识点的最佳方式
  4. 注意书中基于 Android 10.0,实际开发请对照官方文档,处理新版本 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. Chapter 1 Setting Off: Your First Line of Android Code
  2. Chapter 2 Exploring a New Language: A Quick Introduction to Kotlin Programming
  3. Chapter 3 Starting with What You Can See: Exploring Activity
  4. Chapter 4 Apps Need Good Looks Too: All About UI Development
  5. Chapter 5 Balancing Phones and Tablets: Exploring Fragment
  6. Chapter 6 The Global Loudspeaker: A Detailed Look at the Broadcast Mechanism
  7. Chapter 7 The Complete Guide to Data Storage: A Detailed Look at Persistence Techniques
  8. Chapter 8 Sharing Data Across Programs: Exploring ContentProvider
  9. Chapter 9 Enriching Your App: Using Phone Multimedia
  10. Chapter 10 The Silent Worker in the Background: Exploring Service
  11. Chapter 11 Seeing the Wonderful World: Using Network Technology
  12. Chapter 12 The Best UI Experience: Material Design in Practice
  13. Chapter 13 Advanced App Development Components: Exploring Jetpack
  14. Chapter 14 Continuing to Advance: Advanced Techniques You Should Also Master
  15. Chapter 15 Into Practice: Building a Weather Forecast App
  16. Chapter 16 Writing and Publishing an Open-Source Library: PermissionX

FAQ

这本书需要先学 Java 吗?
第3版全书改用 Kotlin 编写并新增了 Kotlin 快速入门章节,不强制要求掌握 Java。但若有一点 Java 或 Kotlin 基础,阅读第3章之后的代码会顺畅很多,官方建议读者至少具备一门语言的基础语法知识。
第3版和第2版主要区别是什么?
第3版基于 Android 10.0 全面重写,开发语言由 Java 改为 Kotlin,新增 Kotlin 入门、Jetpack 详解与开源库实战等内容,并补充了 Retrofit、协程、MVVM 等知识点,同时移除了第2版中的部分章节。
零基础能直接读这本书吗?
如果有基本编程概念(变量、函数、类、面向对象)就能读;完全零基础建议先学一门语言的基础语法,再回来阅读本书,否则第2章的 Kotlin 语法和后续代码会较吃力。
书中的代码现在还能运行吗?
书中示例基于 Android 10.0 与当时的工具链,核心思路和大部分代码仍然适用,但新版 Android Studio 与系统版本存在 API 变更和权限策略调整,建议配合官方文档做适配后运行。

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