【发布时间】:2018-08-20 21:25:07
【问题描述】:
今天我一直在更新我的项目,并从使用 Android.Locations API 迁移到使用 Google Play LocationServices API 和 FusedLocationProviderClient 来获取位置更新。我更新到最新版本的GooglePlayServices API(Base、Basement、Location、Maps、Tasks)并通过 SDK 管理器更新了我本地版本的 GooglePlayServices。
当我尝试使用 GooglePlayServices API 的一部分(例如 FusedLocationProviderClient)时,我收到以下消息:
Java.Lang.RuntimeException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 11400000 but found 8487000. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
但我有:
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
在我的AndroidManifest.xml 中用于我的项目。
这可能是什么问题?
【问题讨论】:
-
@Mohsen 不幸的是,那里的两个答案并没有解决我的问题。我的元数据声明没有嵌套,我只是在设备上完全卸载并清理了项目。
-
@ʍѳђઽ૯ท 另外,Mohsen,我不确定您为什么从这个问题中删除了 Xamarin.Android 标记。可能这个问题与 Xamarin.Android 完全相关,我错过了整个社区,因为该标签不存在。这是在 Xamarin.Android 之上构建的,因此是 Microsoft 的预编译,并且肯定是相关的。
-
在打开一个新线程/问题时,您总是最好提及 什么 IDE 或平台。在这里,我假设您使用的是 Android Studio,它是大多数人的原生 IDE,因此,我决定删除 xamarin 标签,我认为它仍然与 Xamarin 无关。无论如何。现在够清楚了吧?!另外,请粘贴整个 Manifest 以检查是否有错误,您可以提及您正在使用的 IDE 或平台。
标签: android xamarin.android google-play-services android-manifest