title: Successfull Build in Android Studio still crashes on Device
body: <p>I'm pretty much a beginner still and I've tried to make an App to ease my work in the Lab. It's just some basic calculation. I want to make an App that is compatible to the most devices, in case its useful information. Even though the App seems to Build successfully, as soon as it starts on my Device it just crashes immediatelly. Files used are listed below. I tried all the hints Android Studio gave me with no result. App still crashed.</p>
  
  <p>Would be very thankful for some hints and constructive feeback!</p>
  
  <hr>
  
  <p><strong>Main Activity.java</strong></p>
  
  <pre><code>package com.e.concalc;
  
  import androidx.appcompat.app.AppCompatActivity; 
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  import android.widget.EditText;
  import android.widget.TextView;
  
  public class MainActivity extends AppCompatActivity {
  
  
  private EditText protein_sp;
  private EditText salt_sp;
  private EditText protein_st;
  private EditText salt_st;
  private EditText volume_sp;
  
  private TextView tv_resultH2O;
  private TextView tv_resultSalt;
  private TextView tv_resultProtein;
  
  private Button button1;
  
  public MainActivity(TextView tv_resultH2O, TextView tv_resultSalt, TextView tv_resultProtein, Button button1) {
      this.tv_resultH2O = tv_resultH2O;
      this.tv_resultSalt = tv_resultSalt;
      this.tv_resultProtein = tv_resultProtein;
      this.button1 = button1;
  }
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      protein_sp = findViewById(R.id.edit1);
      protein_st = findViewById(R.id.edit2);
      salt_sp = findViewById(R.id.edit3);
      salt_st = findViewById(R.id.edit4);
      volume_sp = findViewById(R.id.edit5);
  
  
  
      button1.setOnClickListener(new View.OnClickListener(){
          @Override
          public void onClick(View v) {
              makeCalculations();
          }
      });
  }
  
  
  private void makeCalculations() {
      double p_sp = Double.valueOf(protein_sp.getText().toString());
      double p_st = Double.valueOf(protein_st.getText().toString());
      double s_sp = Double.valueOf(salt_sp.getText().toString());
      double s_st = Double.valueOf(salt_st.getText().toString());
      double v_sp = Double.valueOf(volume_sp.getText().toString());
  
      double resultH2O;
      double resultSalt;
      double resultProtein;
  
      resultProtein = p_sp * v_sp / p_st;
      resultSalt = s_sp * v_sp / s_st;
      resultH2O = v_sp - resultProtein - resultSalt;
  
  
  
      tv_resultH2O.setText(Double.toString(resultH2O));
      tv_resultSalt.setText(Double.toString(resultSalt));
      tv_resultProtein.setText(Double.toString(resultProtein));
      }
  }
  </code></pre>
  
  <hr>
  
  <p><strong>activity_main.xml</strong> - Layout</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;androidx.constraintlayout.widget.ConstraintLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"
  tools:context=".MainActivity"&gt;
  
  
  
  &lt;TextView
      android:id="@+id/text1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="@string/Protein1"
      android:textSize="20sp"
      android:textStyle="bold"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:layout_constraintHorizontal_bias="0.133"
      app:layout_constraintVertical_bias="0.070" /&gt;
  
  &lt;TextView
      android:id="@+id/text2"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="@string/Protein2"
      android:textSize="20sp"
      android:textStyle="bold"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintHorizontal_bias="0.77"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:layout_constraintVertical_bias="0.070" /&gt;
  
  
  &lt;TextView
      android:id="@+id/text4"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="@string/Salt1"
      android:textSize="20sp"
      android:textStyle="bold"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintStart_toStartOf="@+id/text2"
      app:layout_constraintTop_toTopOf="parent"
      app:layout_constraintVertical_bias="0.21" /&gt;
  
  &lt;TextView
      android:id="@+id/text3"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="@string/Salt2"
      android:textSize="20sp"
      android:textStyle="bold"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintStart_toStartOf="@+id/text1"
      app:layout_constraintTop_toTopOf="parent"
      app:layout_constraintVertical_bias="0.21" /&gt;
  
  &lt;TextView
      android:id="@+id/text5"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="@string/SampleVolume"
      android:textSize="20sp"
      android:textStyle="bold"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintStart_toStartOf="@+id/text3"
      app:layout_constraintTop_toTopOf="parent"
      app:layout_constraintVertical_bias="0.35" /&gt;
  
  
  &lt;EditText
      android:id="@+id/edit1"
      android:layout_width="100dp"
      android:layout_height="40dp"
      android:textSize="15sp"
      android:inputType="number"
      android:hint="@string/hint"
      app:layout_constraintStart_toStartOf="@+id/text1"
      app:layout_constraintTop_toBottomOf="@+id/text1"
      android:importantForAutofill="no" /&gt;
  
  &lt;EditText
      android:id="@id/edit2"
      android:layout_width="100dp"
      android:layout_height="40dp"
      android:textSize="15sp"
      android:inputType="number"
      android:hint="@string/hint"
      app:layout_constraintStart_toStartOf="@+id/text2"
      app:layout_constraintTop_toBottomOf="@+id/text2"
      android:importantForAutofill="no" /&gt;
  
  &lt;EditText
      android:id="@id/edit4"
      android:layout_width="100dp"
      android:layout_height="40dp"
      android:textSize="15sp"
      android:inputType="number"
      android:hint="@string/hint"
      app:layout_constraintStart_toStartOf="@+id/text4"
      app:layout_constraintTop_toBottomOf="@+id/text4"
      android:importantForAutofill="no" /&gt;
  
  &lt;EditText
      android:id="@id/edit3"
      android:layout_width="100dp"
      android:layout_height="40dp"
      android:textSize="15sp"
      android:inputType="number"
      android:hint="@string/hint"
      app:layout_constraintStart_toStartOf="@+id/text3"
      app:layout_constraintTop_toBottomOf="@+id/text3"
      android:importantForAutofill="no" /&gt;
  
  &lt;EditText
      android:id="@+id/edit5"
      android:layout_width="100dp"
      android:layout_height="40dp"
      android:textSize="15sp"
      android:inputType="number"
      android:hint="@string/hint"
      app:layout_constraintStart_toStartOf="@+id/text5"
      app:layout_constraintTop_toBottomOf="@+id/text5"
      android:importantForAutofill="no" /&gt;
  
  &lt;Button
      android:id="@+id/button1"
      android:layout_width="120dp"
      android:layout_height="40dp"
      android:layout_marginBottom="128dp"
      android:text="@string/button1"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintHorizontal_bias="0.158"
      app:layout_constraintStart_toStartOf="parent" /&gt;
  
  
  &lt;Button
      android:id="@+id/button2"
      android:layout_width="120dp"
      android:layout_height="40dp"
      android:layout_marginStart="51dp"
      android:layout_marginLeft="51dp"
      android:text="@string/button2"
      app:layout_constraintBottom_toBottomOf="@+id/button1"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintHorizontal_bias="0.745"
      app:layout_constraintStart_toEndOf="@+id/button1"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="@+id/button1" /&gt;
  
  
  &lt;TextView
      android:id="@+id/tv_resultH2O"
      android:layout_width="100dp"
      android:layout_height="50dp"
      android:layout_centerInParent="true"
  
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:layout_constraintHorizontal_bias="0.1"
      app:layout_constraintVertical_bias="0.6"/&gt;
  
  
  &lt;TextView
      android:id="@+id/tv_resultSalt"
      android:layout_width="100dp"
      android:layout_height="50dp"
      android:layout_centerInParent="true"
      android:textAppearance="?android:attr/textAppearanceLarge"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:layout_constraintHorizontal_bias="0.5"
      app:layout_constraintVertical_bias="0.6"/&gt;
  
  &lt;TextView
      android:id="@+id/tv_resultProtein"
      android:layout_width="100dp"
      android:layout_height="50dp"
      android:layout_centerInParent="true"
      android:textAppearance="?android:attr/textAppearanceLarge"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      app:layout_constraintHorizontal_bias="0.9"
      app:layout_constraintVertical_bias="0.6"/&gt;
  &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>