1

Why do I get this error - RunTimeException: Unable to instantiate activity?

view story
linux-howto

http://stackoverflow.com – My LogCat is saying: java.lang.RunTimeException: Unable to instantiate activity ComponentInfo{com.erikbalen.idealgaslawcalculator/com.erikbalen.idealgaslawcalculator.NumberActivity}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity{ActivityThread.java:2121} Here is my java file: public class NumberActivity extends Activity { EditText pressure = (EditText) findViewById(R.id.editTextPressure); EditText temperature = (EditText) findViewById(R.id.editTextTemperature); EditText volume = (EditText) findViewById(R.id.editTextVolume); TextView answer = (TextView) (HowTos)