This is the java file that is giving the error
package com.example.daksh.timetable;
import android.support.v7.app.AppCompatActivity;
import
To be more generic about the answer provided by @P Fuster. There can be error in your xml files.
I encountered the same error and was having error in the drawable where end tag was missing.
This might be useful for someone who is looking for a different answer. Go to the Gradle Panel and select your module -> Task -> Verification -> Check. This will check the project for errors and will print the log where the error occurs. Most of the time this Kind of error must be a typo present in your XML file of your project
Add agian your deleted drawable image .jpg/png etc formate. and Then run your project to fine working on android studio 3.6.1
You maybe having this error on your java
files because there is one or more XML
file with error.
Go through all your XML
files and resolve errors, then clean
or rebuild
project from build menu
Start with your most recent edited XML
file
It can also occur if you leave an element with a null or empty attribute in your XML layout file else if your java file's path of objects creation such as specifying improper ID for the object
here frombottom= AnimationUtils.loadAnimation(this,R.anim);
in which anim. the id or filename is left blank can lead to such problem.
In my case, I made a custom background which was not recognised.
I removed the <?xml version="1.0" encoding="utf-8"?>
tag from the top of those two XML resources file.
This worked for me, after trying many solutions from the community. @P Fuster's answer made me try this.