I am new to AndroidStudio AND Gradle.
I imported a project from eclipse, created a module, and tried to run the project, but I got this error:
Androi
For me the issue went away once I opened the android folder of the project in Android Studio to run the project.
So basically, because I was trying to run the Android project from the Root folder, it gave me the error. We need to run the project by selecting the android folder of the project only.
Hope this helps someone!
C:\Users\user\.AndroidStudioX.X\system
and DELETE the cache
folderThat should solve the problem.
For me clicking on Sync project with Gradle files button did not solve the problem alone.
After Syncing project with Gradle files, I explicitly had to invalidate the cache and restart studio. Only after this action, the red cross-mark over configuration disappeared and everything started working.
I also had this problem, things I tried:
clicking on Sync project with Gradle files button will solve your problem.
That button is under File section on Android Studio 3.6.1