title: App getting stopped while tried start new activity : AndroidRuntime: FATAL EXCEPTION
body: <h1>Trying to jump from <strong>MainActivity</strong> to <strong>Activity_sign_in</strong></h1>
  <p>trying to jump from main activity to activity sign in. After installing app whenever I am clicking to login button on MainActivity to jump Activity_sign_in_ the app getting stopped immediately. I am using android studio emulator.</p>
  <h2>MainActivity.java</h2>
  <pre><code>package com.aj19990321.zomato20;
  
  import androidx.appcompat.app.AppCompatActivity;
  
  import android.content.Intent;
  import android.os.Bundle;
  import android.view.View;
  import android.view.Window;
  import android.view.WindowManager;
  import android.widget.Button;
  import android.widget.Toast;
  
  public class MainActivity extends AppCompatActivity {
  
      Button login;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          // Code to Hide Title Bar or Status Bar
          requestWindowFeature(Window.FEATURE_NO_TITLE);
          this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  
          // Code to Hide Action Bar
          getSupportActionBar().hide();
  
          setContentView(R.layout.activity_main);
  
          login = findViewById(R.id.btn_login);
  
          login.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  // Toast.makeText(MainActivity.this, &quot;Login has been clicked&quot;,Toast.LENGTH_SHORT).show();
  
                  Intent intent = new Intent(MainActivity.this, Activity_sign_in.class);
                  startActivity(intent);
              }
          });
      }
  }
  </code></pre>
  <h2>MainActivity.xml</h2>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      tools:context=&quot;.MainActivity&quot;&gt;
  
  
      &lt;ImageView
          android:id=&quot;@+id/imageView2&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:scaleType=&quot;centerCrop&quot;
          app:srcCompat=&quot;@drawable/foodbackground&quot; /&gt;
  
      &lt;LinearLayout
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;match_parent&quot;
          android:background=&quot;#72000000&quot;
          android:gravity=&quot;center&quot;
          android:orientation=&quot;vertical&quot;&gt;
  
  
          &lt;ImageView
              android:id=&quot;@+id/imageView3&quot;
              android:layout_width=&quot;match_parent&quot;
              android:layout_height=&quot;150dp&quot;
              app:srcCompat=&quot;@drawable/foodlogomain&quot; /&gt;
  
          &lt;TextView
              android:layout_width=&quot;match_parent&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:layout_marginTop=&quot;20dp&quot;
              android:layout_marginBottom=&quot;80dp&quot;
              android:fontFamily=&quot;@font/pacifico&quot;
              android:gravity=&quot;center&quot;
              android:text=&quot;Zomato&quot;
              android:textColor=&quot;#FFFFFF&quot;
              android:textSize=&quot;60sp&quot; /&gt;
  
          &lt;Button
              android:id=&quot;@+id/btn_login&quot;
              android:layout_width=&quot;200dp&quot;
              android:layout_height=&quot;60dp&quot;
              android:layout_marginTop=&quot;20dp&quot;
              android:background=&quot;@drawable/background_button&quot;
              android:fontFamily=&quot;@font/roboto_medium&quot;
              android:text=&quot;Login&quot;
              android:textColor=&quot;#FFFFFF&quot;
              android:textSize=&quot;20sp&quot;
              android:textStyle=&quot;bold&quot; /&gt;
  
          &lt;Button
              android:id=&quot;@+id/btn_register&quot;
              android:layout_width=&quot;200dp&quot;
              android:layout_height=&quot;60dp&quot;
              android:layout_marginTop=&quot;20dp&quot;
              android:background=&quot;@drawable/background_button&quot;
              android:fontFamily=&quot;@font/roboto_medium&quot;
              android:text=&quot;Register
  &quot;
              android:textColor=&quot;#FFFFFF&quot;
              android:textSize=&quot;20sp&quot;
              android:textStyle=&quot;bold&quot; /&gt;
  
          &lt;TextView
              android:id=&quot;@+id/textView&quot;
              android:layout_width=&quot;match_parent&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:layout_marginTop=&quot;20dp&quot;
              android:gravity=&quot;center&quot;
              android:text=&quot;skip&quot;
              android:textColor=&quot;@color/white&quot;
              android:textSize=&quot;20sp&quot;
              android:textStyle=&quot;bold&quot; /&gt;
      &lt;/LinearLayout&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  <h2>Activity_sign_in.java</h2>
  <pre><code>package com.aj19990321.zomato20;
  
  import androidx.appcompat.app.AppCompatActivity;
  
  import android.os.Bundle;
  
  public class Activity_sign_in extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_sign_in);
      }
  }
  </code></pre>
  <h2>Acivity_sign_in.xml</h2>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      android:background=&quot;@color/myBackground&quot;
      android:orientation=&quot;vertical&quot;
      tools:context=&quot;.Activity_sign_in&quot;&gt;
  
  
      &lt;ScrollView
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;match_parent&quot;
          android:background=&quot;@color/myBackground&quot;&gt;
  
          &lt;LinearLayout
              android:layout_width=&quot;match_parent&quot;
              android:layout_height=&quot;match_parent&quot;
              android:background=&quot;@color/myBackground&quot;
              android:orientation=&quot;vertical&quot;&gt;
  
              &lt;LinearLayout
                  android:layout_width=&quot;match_parent&quot;
                  android:layout_height=&quot;match_parent&quot;
                  android:layout_gravity=&quot;center|center_horizontal|center_vertical&quot;
                  android:layout_marginStart=&quot;40dp&quot;
                  android:layout_marginTop=&quot;40dp&quot;
                  android:layout_marginEnd=&quot;40dp&quot;
                  android:layout_marginBottom=&quot;25dp&quot;
                  android:background=&quot;@color/myBackground&quot;
                  android:orientation=&quot;vertical&quot;&gt;
  
                  &lt;ImageView
  
                      android:layout_width=&quot;match_parent&quot;
                      android:layout_height=&quot;150dp&quot;
  
                      android:layout_marginTop=&quot;20dp&quot;
                      app:srcCompat=&quot;@drawable/foodlogo&quot;
                      app:tint=&quot;#FF5722&quot; /&gt;
  
                  &lt;TextView
                      android:layout_width=&quot;match_parent&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:layout_marginTop=&quot;20dp&quot;
                      android:layout_marginBottom=&quot;20dp&quot;
                      android:fontFamily=&quot;@font/baloo&quot;
                      android:gravity=&quot;center&quot;
                      android:text=&quot;Zomato&quot;
                      android:textColor=&quot;#FF5722&quot;
                      android:textSize=&quot;60sp&quot; /&gt;
  
                  &lt;EditText
                      android:id=&quot;@+id/editTextTextEmailAddress&quot;
                      android:layout_width=&quot;match_parent&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:layout_marginTop=&quot;25dp&quot;
                      android:background=&quot;@drawable/background_edtview&quot;
                      android:ems=&quot;10&quot;
                      android:fontFamily=&quot;@font/roboto&quot;
                      android:hint=&quot;Email Address&quot;
                      android:inputType=&quot;textEmailAddress&quot;
                      android:paddingLeft=&quot;30dp&quot;
                      android:paddingTop=&quot;14dp&quot;
                      android:paddingBottom=&quot;14dp&quot;
                      android:textColorHint=&quot;#494848&quot; /&gt;
  
                  &lt;EditText
                      android:id=&quot;@+id/editTextNumberPassword&quot;
                      android:layout_width=&quot;match_parent&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:layout_marginTop=&quot;25dp&quot;
                      android:background=&quot;@drawable/background_edtview&quot;
                      android:ems=&quot;10&quot;
                      android:fontFamily=&quot;@font/roboto&quot;
                      android:hint=&quot;Password&quot;
                      android:inputType=&quot;numberPassword&quot;
                      android:paddingLeft=&quot;30dp&quot;
                      android:paddingTop=&quot;14dp&quot;
                      android:paddingBottom=&quot;14dp&quot;
                      android:textColorHint=&quot;#494848&quot; /&gt;
  
                  &lt;Button
                      android:id=&quot;@+id/button&quot;
                      android:layout_width=&quot;220dp&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:layout_gravity=&quot;center&quot;
                      android:layout_marginTop=&quot;50dp&quot;
                      android:background=&quot;@drawable/background_button&quot;
                      android:fontFamily=&quot;@font/roboto&quot;
                      android:text=&quot;Login&quot;
                      android:textAllCaps=&quot;false&quot;
                      android:textColor=&quot;#FFFFFF&quot;
                      android:textSize=&quot;24sp&quot;
                      android:textStyle=&quot;bold&quot; /&gt;
  
                  &lt;LinearLayout
                      android:layout_width=&quot;wrap_content&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:layout_gravity=&quot;center&quot;
                      android:layout_marginTop=&quot;20dp&quot;
                      android:orientation=&quot;horizontal&quot;&gt;
  
                      &lt;view
  
                          android:layout_width=&quot;90dp&quot;
                          android:layout_height=&quot;2dp&quot;
                          android:layout_gravity=&quot;center&quot;
                          android:layout_marginEnd=&quot;5dp&quot; /&gt;
  
                      &lt;TextView
                          android:layout_width=&quot;wrap_content&quot;
                          android:layout_height=&quot;wrap_content&quot;
                          android:text=&quot;OR&quot;
                          android:textColor=&quot;#3A3A3A&quot;
                          android:textSize=&quot;15sp&quot; /&gt;
  
                      &lt;view
                          android:layout_width=&quot;90dp&quot;
                          android:layout_height=&quot;2dp&quot;
                          android:layout_gravity=&quot;center&quot;
                          android:layout_marginLeft=&quot;5dp&quot; /&gt;
  
  
                  &lt;/LinearLayout&gt;
  
  
                  &lt;LinearLayout
                      android:layout_width=&quot;match_parent&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:layout_gravity=&quot;center&quot;
                      android:layout_marginTop=&quot;20dp&quot;
                      android:gravity=&quot;center&quot;
                      android:orientation=&quot;horizontal&quot;&gt;
  
                      &lt;ImageView
                          android:id=&quot;@+id/imageView2&quot;
                          android:layout_width=&quot;50dp&quot;
                          android:layout_height=&quot;50dp&quot;
  
                          android:layout_marginRight=&quot;20dp&quot;
                          app:srcCompat=&quot;@drawable/google&quot; /&gt;
  
                      &lt;ImageView
                          android:id=&quot;@+id/imageView3&quot;
  
                          android:layout_width=&quot;50dp&quot;
                          android:layout_height=&quot;50dp&quot;
  
                          android:layout_marginLeft=&quot;20dp&quot;
                          app:srcCompat=&quot;@drawable/facebook&quot; /&gt;
  
                  &lt;/LinearLayout&gt;
  
                  &lt;TextView
                      android:id=&quot;@+id/textView4&quot;
                      android:layout_width=&quot;match_parent&quot;
                      android:layout_height=&quot;wrap_content&quot;
                      android:layout_marginTop=&quot;20dp&quot;
                      android:fontFamily=&quot;@font/roboto_medium&quot;
                      android:gravity=&quot;center&quot;
                      android:text=&quot;want to create an account ?&quot;
                      android:textColor=&quot;#000000&quot; /&gt;
  
              &lt;/LinearLayout&gt;
          &lt;/LinearLayout&gt;
  
      &lt;/ScrollView&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  <h2>Run : Error</h2>
  <pre><code>E/AndroidRuntime: FATAL EXCEPTION: main
      Process: com.aj19990321.zomato20, PID: 15536
      java.lang.RuntimeException: Unable to start activity ComponentInfo{com.aj19990321.zomato20/com.aj19990321.zomato20.Activity_sign_in}: android.view.InflateException: Binary XML file line #105 in com.aj19990321.zomato20:layout/activity_sign_in: Binary XML file line #105 in com.aj19990321.zomato20:layout/activity_sign_in: Error inflating class null
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3449)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
          at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
          at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
          at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
          at android.os.Handler.dispatchMessage(Handler.java:106)
          at android.os.Looper.loop(Looper.java:223)
          at android.app.ActivityThread.main(ActivityThread.java:7656)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
       Caused by: android.view.InflateException: Binary XML file line #105 in com.aj19990321.zomato20:layout/activity_sign_in: Binary XML file line #105 in com.aj19990321.zomato20:layout/activity_sign_in: Error inflating class null
       Caused by: android.view.InflateException: Binary XML file line #105 in com.aj19990321.zomato20:layout/activity_sign_in: Error inflating class null
       Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
          at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1052)
          at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:995)
          at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:959)
          at android.view.LayoutInflater.rInflate(LayoutInflater.java:1121)
          at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
          at android.view.LayoutInflater.rInflate(LayoutInflater.java:1124)
          at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
          at android.view.LayoutInflater.rInflate(LayoutInflater.java:1124)
          at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
          at android.view.LayoutInflater.rInflate(LayoutInflater.java:1124)
          at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
          at android.view.LayoutInflater.rInflate(LayoutInflater.java:1124)
          at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
          at android.view.LayoutInflater.inflate(LayoutInflater.java:680)
          at android.view.LayoutInflater.inflate(LayoutInflater.java:532)
          at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
          at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:699)
          at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:195)
          at com.aj19990321.zomato20.Activity_sign_in.onCreate(Activity_sign_in.java:12)
          at android.app.Activity.performCreate(Activity.java:8000)
          at android.app.Activity.performCreate(Activity.java:7984)
          at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
          at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
          at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
          at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
          at android.os.Handler.dispatchMessage(Handler.java:106)
          at android.os.Looper.loop(Looper.java:223)
  E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:7656)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
  I/Process: Sending signal. PID: 15536 SIG: 9
  </code></pre>