Firebase invite gives error Google play service stopped
<p>I integrated a Firebase invite service in my app, but when I click on the send button from  the Firebase invite default email chooser screen, it gives me an error "Google play service stopped".</p>

<p>Please help me to resolve this error.
<a href="https://i.stack.imgur.com/F7yrd.png" rel="nofollow noreferrer">Project Level Gradle configuration</a> and
<a href="https://i.stack.imgur.com/7k1YM.png" rel="nofollow noreferrer">App level Gradle configuration file</a>
Thank you.</p>