roi*_*erg 5 string android broadcastreceiver
由于某种原因,我无法获取 strings.xml 中的字符串。这是我的代码:
public class SDK_Referrer extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
String srt = context.getResources().getString(R.string.master);
Run Code Online (Sandbox Code Playgroud)
它无法识别“master”字符串。当我检查 R.string 中的选项时...我得到诸如 R.string.copy、R.string.cancel 或 R.string.ok 之类的东西...而不是我在 R.string 中的字符串xml 文件。这是为什么?
| 归档时间: |
|
| 查看次数: |
4622 次 |
| 最近记录: |