title: how can I solve "package R does not exist"
body: <pre><code> button = (Button) findViewById(R.id.button);
   maintext = (TextView) findViewById(R.id.maintext);
   setContentView(R.layout.activity_main);
  </code></pre>
  
  <p>there are three different reasons for explanations of "package R does not exist"</p>