I'm trying to make cubic yard calculator app for android and getting errors
<p>This is my first attempt at coding. I'm trying to a make a cubic yard calculator for a friend of mine. I have the formula for the calculation, I tried some coding i saw in some youtube videos and now I'm stuck. I'm getting errors about string format and null pointer exception and something about decimals.
Here's what i got so far:</p>

<pre><code>public void onButtonClick(View v) {
    EditText e1 = (EditText)findViewById(R.id.Length);
    EditText e2 = (EditText)findViewById(R.id.width);
    EditText e3 = (EditText)findViewById(R.id.depth);
    TextView t1 = (TextView)findViewById(R.id.textView);
    int num1 = Integer.parseInt(e1.getText().toString());
    int num2 = Integer.parseInt(e2.getText().toString());
    int num3 = Integer.parseInt(e3.getText().toString());
    int sum = num1 * num2 * num3 / 12 / 27;
    t1.setText(Integer.toString(sum));
}
</code></pre>