I faced the same problem but I successfully solved the problem by changing the version of compileSdkVersion to the latest which is 29 and change the version of targetSdkVersion to the latest which is 29.
Go to the gradile.build file and change the compilesdkversion and targetsdkversion.