---
title: "public.xml  current.xml 使用心得（frameworks\\base\\core\\res\\res\\values）"
author: "ishelf"
date: "2010-11-03T17:12:11Z"
tags: []
categories: ["移动开发"]
slug: "public-xml-current-xml-frameworks-base-core-res-res-values"
draft: false
lastmod: "2010-11-03T17:26:56Z"
id: 801958
url: "https://ishelf.iteye.com/blog/801958"
---

在public.xml中资源数据的定义会影响到current.xml文件，它们分别在frameworks\\base\\core\\res\\res\\values和frameworks\\base\\api\\current.xml中

 

      当进行内核文件修改时，需要特别注意public.xml文件的同步，该文档定义了资源文件的二进制兼容性。因此需要小心对待该文件，否则可能会破坏该版本的向后兼容性。

      为了避免破坏兼容性，新的资源需加在同类资源的最后（主要ID值，按照ID值递增）。若是放置在中间会导致随后的同类资源被赋予新的ID值从而破坏兼容性。