Google 应用邀请:Google Play 服务元数据标签?

Google App Invites: Google Play Services meta data tag?

在 google 应用程序邀请指南 (https://developers.google.com/app-invites/android/guides/app) 中,我们被要求将以下元数据标记放入 android 清单中:

<meta-data
      android:name="com.google.android.gms.version"
      android:value="@integer/google_play_services_version" />

在样本的 android 清单中,我们在任何地方都看不到这个标签:

https://github.com/googlesamples/google-services/blob/master/android/appinvites/app/src/main/AndroidManifest.xml

引导有误吗?

有点。它已经过时了。过去,您必须将该元素添加到清单中,但是使用最新版本的 Android Gradle 工具,这由 Gradle 插件自动处理当您拥有 Google Play 服务依赖项时。