---
title: "查看Android源码的当前版本"
author: "dingran"
date: "2013-08-20T11:15:53Z"
tags: []
categories: ["移动开发"]
slug: "android"
draft: false
lastmod: "2013-08-20T11:15:53Z"
id: 1927444
url: "https://dingran.iteye.com/blog/1927444"
---

下载好的源码，如何快速查看当前的版本是多少呢？

 

查找这个文件：

 

/build/core/version\_defaults.mk

 

查看文件中的：

 

ifeq "" "$(PLATFORM\_VERSION)"  
  # This is the canonical definition of the platform version,  
  # which is the version that we reveal to the end user.  
  # Update this value when the platform version changes (rather  
  # than overriding it somewhere else).  Can be an arbitrary string.  
  PLATFORM\_VERSION := 4.1.2  
endif

 

他的位置比较靠前，打开就能看到了，明显，版本是4.1.2嘛，哈哈。很方便吧。