what is the actual root cause of this issue? I already sync with gradle files but eventually failed.
Just you have to do >> open File --> Sync Project with Gradle Files and then after >> open File --> invalidate Android Studio caches / restart so done this problem.:)