framework 添加新资源

戈尔多.D.罗杰  :framework service 里面相加个吐司,获取不到String 资源 

https://www.cnblogs.com/zl1991/p/5241891.html  鸭子船长

一.找不到资源 R cannot be resolved to a variable

 

二.神避

2.1.添加资源(如图片、字符串)到framework/base/core/res/res对应类型文件的目录
2.2.在framework/base/core/res/res/values/symbols.xml中仿照其格式声明资源ID
2.3.mmm framework/base/core/res资源目录

  

三.白胡子:旧时代没有我的船

Toast.makeText(mContext, getResources().getString(R.string.illegal_boot), Toast.LENGTH_LONG).show();

  

  

原文地址:https://www.cnblogs.com/crushgirl/p/14515997.html