This is the java file that is giving the error
package com.example.daksh.timetable;
import android.support.v7.app.AppCompatActivity;
import
This similar error may also show if you have deleted an Activity java file previously and have not deleted the corresponding xml layout file.
Delete the xml file for the deleted Activity java file and Clean or Rebuild the project.
The reason behind it may be because of the mismatch of context in the xml. (This might occur if you are copy-pasting an xml layout code) Match the tools:context to the java file of the activity.