Solving Binary XML file line #3: Error inflating class <unknown>
<p>This error occured when i updated android studio, i've spent several hours trying to figure out the fix for it but have had no success. The code is to show an activity that lets the user create a note that they can place in their text and then save it for viewing later on. </p>

<p>DisplayNote</p>

<pre><code>public class DisplayNote extends AppCompatActivity {
private NoteDataBase mydb;
EditText name;
EditText content;
private CoordinatorLayout coordinatorLayout;
String dateString;
int id_To_Update = 0;
Snackbar snackbar;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.viewnotepad);
    name = (EditText) findViewById(R.id.txtname);
    content = (EditText) findViewById(R.id.txtcontent);

    coordinatorLayout = (CoordinatorLayout) findViewById(R.id
            .coordinatorLayout);
    mydb = new NoteDataBase(this);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar2);
    setSupportActionBar(toolbar);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);

    toolbar.setNavigationOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            onBackPressed();
        }
    });
    Bundle extras = getIntent().getExtras();
    if (extras != null) {
        int Value = extras.getInt("id");
        if (Value &gt; 0) {
            snackbar = Snackbar
                    .make(coordinatorLayout, "Note Id : " + String.valueOf(Value), Snackbar.LENGTH_LONG);
            snackbar.show();
            Cursor rs = mydb.getData(Value);
            id_To_Update = Value;
            rs.moveToFirst();
            String nam = rs.getString(rs.getColumnIndex(NoteDataBase.name));
            String contents = rs.getString(rs.getColumnIndex(NoteDataBase.remark));
            if (!rs.isClosed()) {
                rs.close();
            }
            name.setText((CharSequence) nam);
            content.setText((CharSequence) contents);
        }
    }
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.display_menu, menu);
    return true;
}

public boolean onOptionsItemSelected(MenuItem item) {
    super.onOptionsItemSelected(item);
    switch (item.getItemId()) {
        case R.id.Save:
            Bundle extras = getIntent().getExtras();
            Calendar c = Calendar.getInstance();
            System.out.println("Current time =&gt; " + c.getTime());
            SimpleDateFormat df = new SimpleDateFormat("dd-MMM-yyyy");
            String formattedDate = df.format(c.getTime());
            dateString = formattedDate;
            if (extras != null) {
                int Value = extras.getInt("id");
                if (Value &gt; 0) {
                    if (content.getText().toString().trim().equals("")
                            || name.getText().toString().trim().equals("")) {
                        snackbar = Snackbar
                                .make(coordinatorLayout, "Please fill in name of the note", Snackbar.LENGTH_LONG);
                        snackbar.show();
                    } else {
                        if (mydb.updateNotes(id_To_Update, name.getText()
                                .toString(), dateString, content.getText()
                                .toString())) {
                            snackbar = Snackbar
                                    .make(coordinatorLayout, "Note updated!", Snackbar.LENGTH_LONG);
                            snackbar.show();
                        } else {
                            snackbar = Snackbar
                                    .make(coordinatorLayout, "Error occurred when updating", Snackbar.LENGTH_LONG);
                            snackbar.show();
                        }
                    }
                } else {
                    if (content.getText().toString().trim().equals("")
                            || name.getText().toString().trim().equals("")) {
                        snackbar = Snackbar
                                .make(coordinatorLayout, "Please fill in content of the note", Snackbar.LENGTH_LONG);
                        snackbar.show();
                    } else {
                        if (mydb.insertNotes(name.getText().toString(), dateString,
                                content.getText().toString())) {
                            snackbar = Snackbar
                                    .make(coordinatorLayout, "Note successfully added", Snackbar.LENGTH_LONG);
                            snackbar.show();
                        } else {
                            snackbar = Snackbar
                                    .make(coordinatorLayout, "Error occurred when saving note", Snackbar.LENGTH_LONG);
                            snackbar.show();
                        }
                    }
                }
            }
            return true;
        default:
            return super.onOptionsItemSelected(item);
    }
}
</code></pre>

<p>}</p>

<p>Viewnotepad.xml</p>

<pre><code>   &lt;?xml version="1.0" encoding="utf-8"?&gt;

&lt;android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/coordinatorLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"&gt;

    &lt;LinearLayout
        android:id="@+id/scrollView1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:weightSum="10"&gt;

        &lt;android.support.design.widget.AppBarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"&gt;

            &lt;android.support.v7.widget.Toolbar
                android:id="@+id/toolbar2"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                app:layout_scrollFlags="scroll|enterAlways" /&gt;
        &lt;/android.support.design.widget.AppBarLayout&gt;

        &lt;LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:orientation="horizontal"
            android:weightSum="2" &gt;

            &lt;TextView
                android:id="@+id/textView1"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="0.5"
                android:gravity="top|center"
                android:text="NAME" /&gt;

            &lt;EditText
                android:id="@+id/txtname"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:gravity="top|center"
                android:inputType="textAutoCorrect"
                android:hint="Name of note here"
                android:layout_weight="1.5"
                &gt;
            &lt;/EditText&gt;
        &lt;/LinearLayout&gt;

        &lt;LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="9"
            android:orientation="vertical"
            android:weightSum="2" &gt;

            &lt;EditText
                android:id="@+id/txtcontent"
                android:hint="Your text here"
                android:gravity="top|start"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:inputType="textMultiLine"&gt;
            &lt;/EditText&gt;
        &lt;/LinearLayout&gt;

    &lt;/LinearLayout&gt;
&lt;/android.support.design.widget.CoordinatorLayout&gt;
</code></pre>

<p>Error Log</p>

<pre><code>java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.shakeel.appidea2/com.example.shakeel.appidea2.diary.DisplayNote}: android.view.InflateException: Binary XML file line #3: Binary XML file line #3: Error inflating class &lt;unknown&gt;
                                                                              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2434)
                                                                              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494)
                                                                              at android.app.ActivityThread.access$900(ActivityThread.java:157)
                                                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356)
                                                                              at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                              at android.os.Looper.loop(Looper.java:148)
                                                                              at android.app.ActivityThread.main(ActivityThread.java:5551)
                                                                              at java.lang.reflect.Method.invoke(Native Method)
                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
                                                                           Caused by: android.view.InflateException: Binary XML file line #3: Binary XML file line #3: Error inflating class &lt;unknown&gt;
                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
                                                                              at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:267)
                                                                              at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129)
                                                                              at com.example.shakeel.appidea2.diary.DisplayNote.onCreate(DisplayNote.java:34)
                                                                              at android.app.Activity.performCreate(Activity.java:6272)
                                                                              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
                                                                              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2387)
                                                                              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494) 
                                                                              at android.app.ActivityThread.access$900(ActivityThread.java:157) 
                                                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356) 
                                                                              at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                              at android.os.Looper.loop(Looper.java:148) 
                                                                              at android.app.ActivityThread.main(ActivityThread.java:5551) 
                                                                              at java.lang.reflect.Method.invoke(Native Method) 
                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730) 
                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620) 
                                                                           Caused by: android.view.InflateException: Binary XML file line #3: Error inflating class &lt;unknown&gt;
                                                                              at android.view.LayoutInflater.createView(LayoutInflater.java:645)
                                                                              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
                                                                              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
                                                                              at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:267) 
                                                                              at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129) 
                                                                              at com.example.shakeel.appidea2.diary.DisplayNote.onCreate(DisplayNote.java:34) 
                                                                              at android.app.Activity.performCreate(Activity.java:6272) 
                                                                              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108) 
                                                                              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2387) 
                                                                              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494) 
                                                                              at android.app.ActivityThread.access$900(ActivityThread.java:157) 
                                                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356) 
                                                                              at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                              at android.os.Looper.loop(Looper.java:148) 
                                                                              at android.app.ActivityThread.main(ActivityThread.java:5551) 
                                                                              at java.lang.reflect.Method.invoke(Native Method) 
                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730) 
                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620) 
                                                                           Caused by: java.lang.reflect.InvocationTargetException
                                                                              at java.lang.reflect.Constructor.newInstance(Native Method)
                                                                              at android.view.LayoutInflater.createView(LayoutInflater.java:619)
                                                                              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764) 
                                                                              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704) 
                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
                                                                              at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:267) 
                                                                              at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129) 
                                                                              at com.example.shakeel.appidea2.diary.DisplayNote.onCreate(DisplayNote.java:34) 
                                                                              at android.app.Activity.performCreate(Activity.java:6272) 
                                                                              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108) 
                                                                              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2387) 
                                                                              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494) 
                                                                              at android.app.ActivityThread.access$900(ActivityThread.java:157) 
                                                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356) 
                                                                              at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                              at android.os.Looper.loop(Looper.java:148) 
                                                                              at android.app.ActivityThread.main(ActivityThread.java:5551) 
                                                                              at java.lang.reflect.Method.invoke(Native Method) 
                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730) 
                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620) 
                                                                           Caused by: java.lang.IllegalArgumentException: You need to use a Theme.AppCompat theme (or descendant) with the design library.
                                                                              at android.support.design.widget.ThemeUtils.checkAppCompatTheme(ThemeUtils.java:34)
                                                                              at android.support.design.widget.CoordinatorLayout.&lt;init&gt;(CoordinatorLayout.java:182)
                                                                              at android.support.design.widget.CoordinatorLayout.&lt;init&gt;(CoordinatorLayout.java:176)
                                                                              at java.lang.reflect.Constructor.newInstance(Native Method) 
                                                                              at android.view.LayoutInflater.createView(LayoutInflater.java:619) 
                                                                              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764) 
                                                                              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704) 
                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
                                                                              at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:267) 
                                                                              at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129) 
                                                                              at com.example.shakeel.appidea2.diary.DisplayNote.onCreate(DisplayNote.java:34) 
                                                                              at android.app.Activity.performCreate(Activity.java:6272) 
                                                                              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108) 
                                                                              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2387) 
                                                                              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494) 
                                                                              at android.app.ActivityThread.access$900(ActivityThread.java:157) 
                                                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356) 
                                                                              at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                              at android.os.Looper.loop(Looper.java:148) 
                                                                              at android.app.ActivityThread.main(ActivityThread.java:5551) 
                                                                              at java.lang.reflect.Method.invoke(Native Method) 
                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730) 
                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620) 
</code></pre>