title: Onclick simple program giving logic error ( 'Unable to open stack trace file '/data/anr/traces.txt': Permission denied')
body: <p>I am getting the error 'Unable to open stack trace file '/data/anr/traces.txt': Permission denied' which I know has somthing to do with error in the logic; the issue is my xml files are spic and span, therefore I assume it must be by activity class.</p>
  
  <p>I have a main layout (main.xml) which has the buttons: 'start' and 'instructions'. When clicking the instructions button it should go to the layout: instructions.xml and when clicking the start button it should go to the layout: test_layout.xml. </p>
  
  <p>For any insight what so ever I would be most grateful and pour millions of reputation on you. Thanks. </p>
  
  <p>-Is the issue that I am implementing the OnClickListener ? </p>
  
  <p>-Is it something to do not putting a @Override on top of the second method ('public void onClick')? because it says that I can only place it when overwriting a super class.**</p>
  
  <p>Please, it very short code, I could appreciate if you could take a quick glance and tell me what you think. I posted the manifest bellow the code. </p>
  
  <pre><code>package it.will.work;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.widget.Button;
  
  
  
  public class ActualWorkingQuizActivity extends Activity implements OnClickListener{
  
  
   Button start = (Button) findViewById(it.will.work.R.id.start_main);
   Button instructions = (Button) findViewById(it.will.work.R.id.instructions_main);
  
  
      /* Called when the activity is first created. */
         @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
  
       //sets the Click Listeners
      start.setOnClickListener(this);
      instructions.setOnClickListener(this); 
  
  }
  
  public void onClick(View v) {
       if (v==start) {
           setContentView(it.will.work.R.layout.test_layout);
       }
       else if (v==instructions) {
           setContentView(it.will.work.R.layout.instructions);
  }
       }
       }
  </code></pre>
  
  <p>Here is my manifest.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="it.will.work"
     android:versionCode="1"
     android:versionName="1.0" &gt;
  
     &lt;uses-sdk android:minSdkVersion="7" /&gt;
  
     &lt;application
         android:icon="@drawable/starwarsicon"
         android:label="@string/appname" &gt;
         &lt;activity
             android:label="@string/appname"
             android:name=".ActualWorkingQuizActivity" &gt;
             &lt;intent-filter &gt;
                 &lt;action android:name="android.intent.action.MAIN" /&gt;
                 &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
             &lt;/intent-filter&gt;
         &lt;/activity&gt;
     &lt;/application&gt;
  </code></pre>
  
  <p>          </p>