提问人:Programmer 提问时间:11/6/2023 更新时间:11/6/2023 访问量:59
Android 应用程序显示 Google Play 服务已过期
Android app is saying Google Play services out of date
问:
我正在尝试在我的 Android (Java) 项目中创建一个基本的 Google 地图,但每次我尝试运行它时,我都会转到日志语句,它说
"Google Play services out of date for com.example.findaseat. Requires 13400000 but found 11743470"
只是关于正在运行的内容的一些信息:
安卓工作室 长颈鹿 |2022.3.1 补丁 1 Build #AI-223.8836.35.2231.10671973,构建于 2023 年 8 月 16 日
Pixel 2 Nougat API 级别:24 ABI:x86 目标:Android 7.0(Google Play 服务)
- 这些是我的 SDK 工具
- 谷歌地图相关代码:
dependencies {
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.9.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("com.google.firebase:firebase-auth:22.2.0")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
implementation ("com.google.android.gms:play-services-maps:18.1.0")
}
Android清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.FindASeat"
tools:targetApi="31">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/my_map_api_key" />
</application>
</manifest>
我按照此视频中的所有步骤完成了其余代码: 谷歌地图设置
我尝试单击模拟器上的更新按钮,它要求我登录我的Google帐户,我这样做了,但每次它都会给我一个服务器错误。
我尝试转到我的模拟器设置,但在播放服务更新时出现加载屏幕。
我也尝试使用其他模拟器(Nexus等),但我一直遇到同样的问题。我也不确定在我的构建文件中将我的谷歌地图 API 版本降级到哪个版本,我已经尝试了一堆数字,如果我太低,有时我会在我的 MainActivity.java 中出现错误
答: 暂无答案
评论