The problem is that in the build.gradle file there is a variable compileSdk whose value was not properly declared.
Before:
So, in your Android Studio you need to add the rootProject.ext. dependency import that will point to the file with the correct variable value.
After:
I hope it can helps anyone facing this problem.

