All the code was working perfectly and nothing was wrong. Suddenly when i want to run the app it gives me this one error.
I have not touched the code.I tried uninstalling
I have solved this error.
Step 1. Remove .gradle file from the project.
Step 2. Remove .idea file from the project.
Step 3. Rebuild the project, that's all.
Happy Coding