title: onClick crash Resources$NotFoundException
body: <p>I'm creating a simple microwave power calculator app in Android Studio. I've only just downloaded this tonight and haven't written anything for Android before. </p>
  
  <p>My code shows no errors yet when I run the app on my phone it force closes when I hit the calculate button, with the following error in the log.</p>
  
  <pre><code>01-09 02:33:43.885  12397-12397/com.microwave D/OpenGLRenderer﹕ Enabling debug mode 0
  01-09 02:33:48.319  12397-12397/com.microwave W/IInputConnectionWrapper﹕ beginBatchEdit on inactive InputConnection
  01-09 02:33:48.319  12397-12397/com.microwave W/IInputConnectionWrapper﹕ endBatchEdit on inactive InputConnection
  01-09 02:33:48.870  12397-12397/com.microwave W/IInputConnectionWrapper﹕ beginBatchEdit on inactive InputConnection
  01-09 02:33:48.870  12397-12397/com.microwave W/IInputConnectionWrapper﹕ endBatchEdit on inactive InputConnection
  01-09 02:33:50.591  12397-12397/com.microwave W/IInputConnectionWrapper﹕ beginBatchEdit on inactive InputConnection
  01-09 02:33:50.591  12397-12397/com.microwave W/IInputConnectionWrapper﹕ endBatchEdit on inactive InputConnection
  01-09 02:33:51.862  12397-12397/com.microwave W/IInputConnectionWrapper﹕ beginBatchEdit on inactive InputConnection
  01-09 02:33:51.862  12397-12397/com.microwave W/IInputConnectionWrapper﹕ endBatchEdit on inactive InputConnection
  01-09 02:33:53.404  12397-12397/com.microwave W/ResourceType﹕ No known package when getting value for resource number 0xffffff38
  01-09 02:33:53.404  12397-12397/com.microwave D/AndroidRuntime﹕ Shutting down VM
  01-09 02:33:53.404  12397-12397/com.microwave W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41ed6d40)
  01-09 02:33:53.414  12397-12397/com.microwave E/AndroidRuntime﹕ FATAL EXCEPTION: main
      Process: com.microwave, PID: 12397
      java.lang.IllegalStateException: Could not execute method of the activity
              at android.view.View$1.onClick(View.java:3823)
              at android.view.View.performClick(View.java:4438)
              at android.view.View$PerformClick.run(View.java:18422)
              at android.os.Handler.handleCallback(Handler.java:733)
              at android.os.Handler.dispatchMessage(Handler.java:95)
              at android.os.Looper.loop(Looper.java:136)
              at android.app.ActivityThread.main(ActivityThread.java:5034)
              at java.lang.reflect.Method.invokeNative(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:515)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1270)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1086)
              at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
              at dalvik.system.NativeStart.main(Native Method)
       Caused by: java.lang.reflect.InvocationTargetException
              at java.lang.reflect.Method.invokeNative(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:515)
              at android.view.View$1.onClick(View.java:3818)
              at android.view.View.performClick(View.java:4438)
              at android.view.View$PerformClick.run(View.java:18422)
              at android.os.Handler.handleCallback(Handler.java:733)
              at android.os.Handler.dispatchMessage(Handler.java:95)
              at android.os.Looper.loop(Looper.java:136)
              at android.app.ActivityThread.main(ActivityThread.java:5034)
              at java.lang.reflect.Method.invokeNative(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:515)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1270)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1086)
              at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
              at dalvik.system.NativeStart.main(Native Method)
       Caused by: android.content.res.Resources$NotFoundException: String resource ID #0xffffff38
              at android.content.res.Resources.getText(Resources.java:244)
              at android.content.res.XResources.getText(XResources.java:696)
              at android.widget.TextView.setText(TextView.java:3888)
              at com.microwave.MainActivity.calculate(MainActivity.java:62)
              at java.lang.reflect.Method.invokeNative(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:515)
              at android.view.View$1.onClick(View.java:3818)
              at android.view.View.performClick(View.java:4438)
              at android.view.View$PerformClick.run(View.java:18422)
              at android.os.Handler.handleCallback(Handler.java:733)
              at android.os.Handler.dispatchMessage(Handler.java:95)
              at android.os.Looper.loop(Looper.java:136)
              at android.app.ActivityThread.main(ActivityThread.java:5034)
              at java.lang.reflect.Method.invokeNative(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:515)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1270)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1086)
              at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
              at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>Here's the rest of the code and the XML. I assume I have something very basic wrong as I'm just using prior basic Java knowledge and know nothing about android.</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
      android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity"&gt;
  
      &lt;LinearLayout
          android:orientation="vertical"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:layout_alignParentTop="true"
          android:layout_alignParentLeft="true"
          android:layout_alignParentStart="true"&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textAppearance="?android:attr/textAppearanceLarge"
              android:text="Recipe Power"
              android:id="@+id/textView" /&gt;
  
          &lt;EditText
              android:layout_width="106dp"
              android:layout_height="wrap_content"
              android:inputType="number"
              android:ems="10"
              android:id="@+id/recipeP"
              android:layout_gravity="right"
              android:enabled="true" /&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textAppearance="?android:attr/textAppearanceLarge"
              android:text="Microwave Power"
              android:id="@+id/textView2" /&gt;
  
          &lt;EditText
              android:layout_width="106dp"
              android:layout_height="wrap_content"
              android:inputType="number"
              android:ems="10"
              android:id="@+id/microwaveP"
              android:layout_gravity="right" /&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textAppearance="?android:attr/textAppearanceLarge"
              android:text="Recipe Time"
              android:id="@+id/textView3" /&gt;
  
          &lt;EditText
          android:layout_width="106dp"
          android:layout_height="wrap_content"
          android:inputType="number"
          android:ems="10"
          android:id="@+id/recipeT"
          android:layout_gravity="right" /&gt;
  
          &lt;Button
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Calculate"
              android:id="@+id/calculateButton"
              android:layout_gravity="center_horizontal"
              android:nestedScrollingEnabled="false"
              android:enabled="true"
              android:onClick="calculate" /&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textAppearance="?android:attr/textAppearanceLarge"
              android:id="@+id/result"
              android:layout_gravity="center_horizontal" /&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Main activity</p>
  
  <pre><code>package com.microwave;
  
  import android.support.v7.app.ActionBarActivity;
  import android.os.Bundle;
  import android.text.Editable;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.view.View;
  import android.widget.EditText;
  import android.widget.TextView;
  
  
  public class MainActivity extends ActionBarActivity {
  EditText microwaveP;
  EditText recipeP;
  EditText recipeT;
  TextView result;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      }
  
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.menu_main, menu);
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          // Handle action bar item clicks here. The action bar will
          // automatically handle clicks on the Home/Up button, so long
          // as you specify a parent activity in AndroidManifest.xml.
          int id = item.getItemId();
  
          //noinspection SimplifiableIfStatement
          if (id == R.id.action_settings) {
              return true;
          }
  
          return super.onOptionsItemSelected(item);
      }
  
  
      public void calculate(View view){
  
  
          int recipePower = Integer.parseInt(recipeP.getText().toString());
          int microwavePower = Integer.parseInt(microwaveP.getText().toString());
          int recipeTime = Integer.parseInt(recipeT.getText().toString());
          int difference = recipePower - microwavePower;
          int differencePercent = recipePower / difference;
          int microwaveTime = recipeTime * differencePercent;
          result.setText(microwaveTime);
  
      }
  }
  </code></pre>