Framework adds custom String

1./framework/base/core/res/res/value/srting.xml

Add custom string content. I stepped on a trap here. Through searching, I found the " shutdown"  string that I wanted to modify.

/framework/base/core/res/res/values-zh-rCN/srting.xml, the new custom string is only added here, and the compilation will fail, prompting that the string cannot be found.

<string name="sleep_mode">Sleep</string>

2.frameworks\base\core\res\res\symbols.xml

symbol adds custom string

<java-symbol type="string" name="sleep_mode" />

3.Compile

3.1 Compile the framework directly 

mmm framework/base -j12

3.2 Compile the entire firmware

Guess you like

Origin blog.csdn.net/MilesMatheson/article/details/132105713