The Android 3.18.1 version has been adapted to AndroidX, and the version of firebase has been upgraded. The firebase applied for earlier needs to be updated to check the api_key permission setting.
Before upgrading your application(s) to the latest SDK version, please make sure that the API key(s) used in your application(s) are whitelisted for the Firebase Installations API:
2、 Choose the project you use for your application(s).
3、 Open "APIs & Services" and select "Credentials".
4、 Click "Edit API Key" (pencil icon) for the API key in question.
5、 Scroll down to the "API restrictions" section.
6、 From the dropdown menu, add the "Firebase Installations API" to the list of permitted APIs, and click "Save".