Change the compileSdkVersion to:
compileSdkVersion 28
These attributes were added in this version. Check here, here and here
Change the compileSdkVersion to:
compileSdkVersion 28
These attributes were added in this version. Check here, here and here