当我有消息来源时:
TextView localTV = (TextView)findViewById(2312345);
有没有办法让编译器将其转换为具有真实名称的资源,例如:
TextView localTV = (TextView)findViewById(R.id.mytext);
最佳答案
When I have a source with this
拥有该代码的最可能原因是该代码是从 APK 反编译而来的。
is there a way to kindly ask the compiler to transform it into the resource with its real name
没有,原因很简单,可能没有与该编号对应的资源。一旦将这个反编译的应用程序加载到 IDE 中,所有资源都会被分配编号,这些编号可能与反编译代码中的硬编码值匹配,也可能不匹配。
关于android - 来自 int 的资源,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30106346/