To obtain a SHA1 code in Android Studio 4.2, follow these steps:
- Open your Android Studio project.
- Click on the "Gradle" tab on the right-hand side of the screen.
- From there, expand your project -> Tasks -> android.
- Double click on "signingReport" and wait for the Gradle Console to finish running the task.
- Once the task is complete, navigate to the Gradle Console and locate the "SHA1" value next to the "Variant" of your app (usually "debug" or "release").
- Copy the SHA1 code and use it as needed.