linkchen

看以往的教材中R.java都是在项目的\app\build\generated\source\r\debug\包名下的

通常AS会自动在项目的R.java中创建代表项目中资源的资源ID,大致格式如下

public final class R
{
    public static final class layout
    {
        public static final int activity_main = 0x7f040017;
    }

    public static final class mipmap
    {
        public static final int ic_launcher = 0x7f030000;
    }

    public static final class string
    {
        public static final int app_name = 0x7f0b0011;
        public static final int hello_world = 0x7f0b0012;
    }
}

结果今天在使用AS4.0.1新建Helloworld项目,发现\generated\source目录下不存在\r\debug\,在文件管理其中搜索有关R的文件发现R.java变为了R.txt

并且R.txt在D:\Android\HelloWorld\app\build\intermediates\runtime_symbol_list\debug目录下

stackoverflow上面有这样的操作:

https://stackoverflow.com/questions/28522144/where-is-the-r-java-file-in-android-studio

再右键就能show bytecode就能看见了

分类:

技术点:

相关文章:

  • 2021-08-01
  • 2021-10-06
  • 2021-12-12
  • 2021-10-07
  • 2021-11-19
  • 2021-11-01
  • 2021-09-10
  • 2021-09-24
猜你喜欢
  • 2019-03-09
  • 2021-08-01
  • 2021-08-30
  • 2021-08-30
  • 2021-08-01
  • 2021-08-01
  • 2021-08-01
相关资源
相似解决方案