gpt4 book ai didi

AndroidManifest.xml 没有正确的值

转载 作者:行者123 更新时间:2023-11-29 15:12:18 26 4
gpt4 key购买 nike

我正在尝试在嵌套 fragment 中显示 GoogleMaps:

    // inflate and return the layout
View v = inflater.inflate(R.layout.fragment_nearby_map, container, false);
mMapView = (MapView) v.findViewById(R.id.mapView);

但我得到一个似乎与播放服务版本有关的异常,从异常中可以看出:Expected 7095000 but found 4323000

04-19 17:20:20.841  20612-20612/com.mahlzeit E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.mahlzeit, PID: 20612
java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 7095000 but found 4323000. 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" />
at com.google.android.gms.common.GooglePlayServicesUtil.zzJ(Unknown Source)
at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
at com.google.android.gms.maps.internal.zzx.zzad(Unknown Source)

我不确定我必须在这里做什么,因为 version.xml 文件确实包含值 7095000:

版本.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="google_play_services_version">7095000</integer>
</resources>

AndroidManifest.xml

<application
android:allowBackup="true"
android:icon="@drawable/ic_app"
android:label="@string/app_name"
android:theme="@style/AppTheme" >

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

<activity> <!-- ... -->

最佳答案

也许你不需要自己的:

<integer name="google_play_services_version">7095000</integer>

并且应该使用库中提供的那个。尝试删除此条目。

关于AndroidManifest.xml 没有正确的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29731809/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com