title: What is the process android does when starting a app and how it interact with R class at runtime?
body: <p>Recently when I was learning about resource management of Android, I ran into some interesting issues.</p>
  
  <p>1) From the internal perspective of Android runtime, what steps are taken by android OS to start an installed application?</p>
  
  <p>2) R class- R class is a container for static numeric values for resources. But at the end its a collection of integers. How android maps these integers to resources internally? </p>
  
  <pre><code>setContentView(R.layout.activity_main); 
  </code></pre>
  
  <p>Here what <code>setContentView()</code> passed is an int. But this maps to activity_main.xml file.</p>
  
  <p>Same goes with resources like strings and etc. The connection between resource files, code and R class, at runtime seems to be bit confusing.</p>