Issue Regarding Unity and Firebase Integration

I am facing an issue with Unity and Firebase integration. When running simulations inside Unity, everything works fine and my program is able to connect with Firebase seamlessly. However, after building the application and transferring the APK file to a mobile device, the application fails to connect with Firebase and I encounter the following error: Failed to read Firebase options from the app's resources. Either make sure google-services.json is included in your build or specify options explicitly.

I have ensured that the google-services.json file is located within Assets/StreamingAssets, and it seems to be functioning correctly. I have also configured the SHA key to work with both Firebase and my Unity project, and have ensured that the package names match perfectly. Despite these efforts, I have been unable to resolve this issue for several days now and am wondering why it’s not working.