Unity Android报错Unable to check Google Play services availablit

Runtime error: Unable to check Google Play services availablity as the com.google.android.gms.common.GoogleApiAvailability class is not present in this application.
Insert picture description here
Search Google to find a few articles about this error:
Article1: Unable to check Google Play services availablity
Article2: See the comments of chkuang-g

According to these two articles, the author successfully resolved the error:

  • In article 1, some users reported that some aars were missing. The author compared the current project and the previous version and found that they were missing. Manually put com.google.android.gms.play-services-base-17.3.0.aar and com. After google.auto.value.auto-value-annotations-1.6.5.jar is restored from svn. Out of the package again, there is no error.
  • According to the description in article 2, the Resolve management tool is not perfect yet, and there will be multiple issues such as multiple deletions, missing additions, and incorrect pull versions.
  • In addition, consider that different SDKs have inconsistent versions of requirements for the same aar or jar.

to sum up

1. The author's situation is that the jar (aar) required by the Firebase SDK was deleted when the Resolve tool was used to Delete, but it was not added when Resolve was used.
2. It is recommended that the Resolve management tool do not allow Auto-Resolution and Resolutiion On Build, and manage it manually by yourself.
3. The Firebase SDK relies on Google services. Therefore, at the beginning of the application, it is necessary to check whether the Google Play service version meets the requirements of the Firebase Unity SDK. For details, refer to Step 6: Confirm Google Play Service Version Requirements

Guess you like

Origin blog.csdn.net/iningwei/article/details/108511448