title: Application goes off on android studio when I click button to go to other activity?
body: <p>I checked every thing, I'm sure that my code is correct on  activities side, but I can't figure out the error I tried to check the AndroidManifest.xml but I don't see the problem.
  I get this error when I quit the emulator:</p>
  
  <pre><code> *
  
  &gt; V/FA: onActivityCreated D/AndroidRuntime: Shutting down VM
  &gt; E/AndroidRuntime: FATAL EXCEPTION: main
  &gt;     Process: com.example.dictionnary, PID: 7465
  &gt;     java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.dictionnary/com.example.dictionnary.PlannerActivity}:
  &gt; android.view.InflateException: Binary XML file line #72 in
  &gt; com.example.dictionnary:layout/activity_planner: Binary XML file line
  &gt; #72 in com.example.dictionnary:layout/activity_planner: Error inflating class android.support.widget.RecyclerView
  &gt;         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)
  &gt;         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
  &gt;         at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
  &gt;         at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
  &gt;         at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
  &gt;         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
  &gt;         at android.os.Handler.dispatchMessage(Handler.java:107)
  &gt;         at android.os.Looper.loop(Looper.java:214)
  &gt;         at android.app.ActivityThread.main(ActivityThread.java:7356)
  &gt;         at java.lang.reflect.Method.invoke(Native Method)
  &gt;         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
  &gt;         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
  &gt;      Caused by: android.view.InflateException: Binary XML file line #72 in com.example.dictionnary:layout/activity_planner: Binary XML file line #72 in com.example.dictionnary:layout/activity_planner:
  &gt; Error inflating class android.support.widget.RecyclerView
  &gt;      Caused by: android.view.InflateException: Binary XML file line #72 in com.example.dictionnary:layout/activity_planner: Error inflating class android.support.widget.RecyclerView
  &gt;      Caused by: java.lang.ClassNotFoundException: android.support.widget.RecyclerView
  &gt;         at java.lang.Class.classForName(Native Method)
  &gt;         at java.lang.Class.forName(Class.java:454)
  &gt;         at android.view.LayoutInflater.createView(LayoutInflater.java:815)
  &gt;         at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1006)
  &gt;         at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961)
  &gt;         at android.view.LayoutInflater.rInflate(LayoutInflater.java:1123)
  &gt;         at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)
  &gt;         at android.view.LayoutInflater.inflate(LayoutInflater.java:682)
  &gt;         at android.view.LayoutInflater.inflate(LayoutInflater.java:534)
  &gt;         at android.view.LayoutInflater.inflate(LayoutInflater.java:481)
  &gt;         at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:555)
  &gt;         at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161)
  &gt;         at com.example.dictionnary.PlannerActivity.onCreate(PlannerActivity.java:36)
  &gt;         at android.app.Activity.performCreate(Activity.java:7802)
  &gt;         at android.app.Activity.performCreate(Activity.java:7791)
  &gt;         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299)
  &gt;         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
  &gt;         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
  &gt;         at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
  &gt;         at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
  &gt;         at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
  &gt;         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
  &gt;         at android.os.Handler.dispatchMessage(Handler.java:107)
  &gt;         at android.os.Looper.loop(Looper.java:214)
  &gt;         at android.app.ActivityThread.main(ActivityThread.java:7356)
  &gt;         at java.lang.reflect.Method.invoke(Native Method)
  &gt;         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
  &gt;         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
  &gt; E/AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't
  &gt; find class "android.support.widget.RecyclerView" on path:
  &gt; DexPathList[[zip file
  &gt; "/data/app/com.example.dictionnary-NMLUdW6Y7szWNvSxehbDwQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.dictionnary-NMLUdW6Y7szWNvSxehbDwQ==/lib/x86,
  &gt; /system/lib, /system/product/lib]]
  &gt;         at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
  &gt;         at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
  &gt;         at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
  &gt;           ... 28 more
  </code></pre>
  
  <p>*</p>
  
  <p>Here is my simple MainActivity</p>
  
  <pre><code>       public class MainActivity extends AppCompatActivity {
          private Button searchButton, plannerButton;
  
          @Override
          public void onCreate(@Nullable Bundle savedInstanceState ) {
              super.onCreate (savedInstanceState);
              setContentView (R.layout.activity_main);
  
              searchButton = (Button) findViewById (R.id.main_search);
              plannerButton = (Button) findViewById (R.id.main_planner);
              searchButton.setOnClickListener (new View.OnClickListener () {
                  @Override
                  public void onClick(View v) {
                      openActivity2();
  
                  }
              });
          }
          public void openActivity2(){
              Intent intent = new Intent (this, PlannerActivity.class);
              startActivity(intent);
  
          }
      }
  
      And here my activity_main.xml:
  
          &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;RelativeLayout
          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:background="@drawable/welcome"
          tools:context=".MainActivity"&gt;
  
          &lt;ImageView
              android:id="@+id/app_logo"
              android:layout_width="300dp"
              android:layout_height="100dp"
              android:layout_centerHorizontal="true"
              android:layout_marginTop="60dp"
              android:src="@drawable/applogo"
              /&gt;
  
          &lt;TextView
              android:id="@+id/app_slogan"
              android:layout_width="220dp"
              android:layout_height="wrap_content"
              android:layout_alignParentEnd="true"
              android:layout_alignParentTop="true"
              android:layout_marginEnd="88dp"
              android:layout_marginTop="140dp"
              android:text="Discover Apiales"
              android:textAlignment="center"
              android:textColor="@color/colorPrimary"
              android:textSize="22dp"
              android:textStyle="bold|italic"
              /&gt;
          &lt;Button
              android:id="@+id/main_planner"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_alignParentBottom="true"
              android:layout_alignParentStart="true"
              android:layout_marginBottom="10dp"
              android:layout_marginLeft="15dp"
              android:layout_marginRight="15dp"
              android:background="@drawable/buttons"
  
              android:padding="20dp"
              android:textAllCaps="false"
              android:textSize="10sp"
              android:text="Planner"
              android:textColor="@android:color/white"
  
              /&gt;
          &lt;Button
              android:id="@+id/main_search"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_above="@+id/main_planner"
              android:layout_marginBottom="5dp"
              android:layout_marginLeft="15dp"
              android:layout_marginRight="15dp"
              android:background="@drawable/input_design"
  
              android:padding="20dp"
              android:textAllCaps="false"
              android:textSize="10sp"
              android:text="Recherche "
              android:textColor="@android:color/white"
  
              /&gt;
  
  
  
  
      &lt;/RelativeLayout&gt;
  
  
  and here is the second Activity I want to go to once I click on search button, then I'll do the same with planner button to go to an other activity
  
          public class PlannerActivity extends AppCompatActivity {
  
          TextView titlepage, subtitlepage, endpage;
          Button btnAddNew;
  
          DatabaseReference reference;
          RecyclerView ourdoes;
          ArrayList&lt;MyDoes&gt; list;
          DoesAdapter doesAdapter;
  
          @Override
          protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.activity_planner);
  
              titlepage = findViewById(R.id.titlepage);
              subtitlepage = findViewById(R.id.subtitlepage);
              endpage = findViewById(R.id.endpage);
  
              btnAddNew = findViewById(R.id.btnAddNew);
  
              // import font
              Typeface MLight = Typeface.createFromAsset(getAssets(), "fonts/ML.ttf");
              Typeface MMedium = Typeface.createFromAsset(getAssets(), "fonts/MM.ttf");
  
              // customize font
              titlepage.setTypeface(MMedium);
              subtitlepage.setTypeface(MLight);
              endpage.setTypeface(MLight);
  
              btnAddNew.setTypeface(MLight);
  
              btnAddNew.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {
                      Intent a = new Intent(PlannerActivity.this,NewTaskAct.class);
                      startActivity(a);
                  }
              });
  
  
              // working with data
              ourdoes = findViewById(R.id.ourdoes);
              ourdoes.setLayoutManager(new LinearLayoutManager (this));
              list = new ArrayList&lt;MyDoes&gt;();
  
              // get data from firebase
              reference = FirebaseDatabase.getInstance().getReference().child("DoesApp");
              reference.addValueEventListener(new ValueEventListener() {
                  @Override
                  public void onDataChange(DataSnapshot dataSnapshot) {
                      // set code to retrive data and replace layout
                      for(DataSnapshot dataSnapshot1: dataSnapshot.getChildren())
                      {
                          MyDoes p = dataSnapshot1.getValue(MyDoes.class);
                          list.add(p);
                      }
                      doesAdapter = new DoesAdapter(PlannerActivity.this, list);
                      ourdoes.setAdapter(doesAdapter);
                      doesAdapter.notifyDataSetChanged();
                  }
  
                  @Override
                  public void onCancelled(DatabaseError databaseError) {
                      // set code to show an error
                      Toast.makeText(getApplicationContext(), "No Data", Toast.LENGTH_SHORT).show();
                  }
              });
  
          }
      }
  
  
  Here is my activity_planner.xml:
  
      &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;LinearLayout
          android:orientation="vertical"
          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:background="#F4F4F4"
          tools:context=".MainActivity"&gt;
  
  
          &lt;LinearLayout
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:background="@color/colorPrimaryDark"
              android:layout_height="198dp"&gt;
  
              &lt;LinearLayout
                  android:orientation="horizontal"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"&gt;
  
                  &lt;LinearLayout
                      android:layout_marginLeft="16dp"
                      android:orientation="vertical"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"&gt;
  
                      &lt;TextView
                          android:id="@+id/titlepage"
                          android:layout_marginTop="20dp"
                          android:textSize="32sp"
                          android:textColor="#FFF"
                          android:text="My Does"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content" /&gt;
  
                      &lt;TextView
                          android:id="@+id/subtitlepage"
                          android:textSize="18sp"
                          android:textColor="#4A4E6A"
                          android:layout_marginTop="8dp"
                          android:text="Finish Them Quickly Today"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content" /&gt;
  
                  &lt;/LinearLayout&gt;
  
                  &lt;Button
                      android:layout_marginTop="35dp"
                      android:layout_marginLeft="60dp"
                      android:id="@+id/btnAddNew"
                      android:text="+"
                      android:background="@drawable/bgbtnnew"
                      android:textSize="38sp"
                      android:textColor="#FFF"
                      android:textAlignment="center"
                      android:layout_width="52dp"
                      android:layout_height="52dp" /&gt;
  
              &lt;/LinearLayout&gt;
  
              &lt;View
                  android:layout_marginTop="20dp"
                  android:layout_width="match_parent"
                  android:background="#131E69"
                  android:layout_height="1dp" /&gt;
  
          &lt;/LinearLayout&gt;
  
          &lt;android.support.widget.RecyclerView
              android:id="@+id/ourdoes"
              android:layout_width="match_parent"
              android:layout_marginTop="-60dp"
              android:layout_marginRight="16dp"
              android:layout_marginLeft="16dp"
              android:layout_height="wrap_content" /&gt;
  
          &lt;TextView
              android:id="@+id/endpage"
              android:textSize="16sp"
              android:textColor="#9A9A9A"
              android:layout_marginTop="20dp"
              android:text="No More Does"
              android:textAlignment="center"
              android:layout_width="match_parent"
              android:layout_height="wrap_content" /&gt;
  
  
      &lt;/LinearLayout&gt;
  
  
  
  error when the app crashes and quit to go back to the menu of the emulator
  </code></pre>
  
  <p>V/FA: Connecting to remote service
  V/FA: Activity paused, time: 1117469
  D/AndroidRuntime: Shutting down VM
  E/AndroidRuntime: FATAL EXCEPTION: main
      Process: com.example.dictionnary, PID: 11242
      java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.dictionnary/com.example.dictionnary.PlannerActivity}: java.lang.RuntimeException: Font asset not found fonts/ML.ttf
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
          at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
          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:2016)
          at android.os.Handler.dispatchMessage(Handler.java:107)
          at android.os.Looper.loop(Looper.java:214)
          at android.app.ActivityThread.main(ActivityThread.java:7356)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
       Caused by: java.lang.RuntimeException: Font asset not found fonts/ML.ttf
          at android.graphics.Typeface.createFromAsset(Typeface.java:965)
          at com.example.dictionnary.PlannerActivity.onCreate(PlannerActivity.java:45)
          at android.app.Activity.performCreate(Activity.java:7802)
          at android.app.Activity.performCreate(Activity.java:7791)
          at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299)
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) 
          at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 
          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:2016) 
          at android.os.Handler.dispatchMessage(Handler.java:107) 
          at android.os.Looper.loop(Looper.java:214) 
          at android.app.ActivityThread.main(ActivityThread.java:7356) 
          at java.lang.reflect.Method.invoke(Native Method) 
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 
  I/Process: Sending signal. PID: 11242 SIG: 9</p>