简体   繁体   English

平台异常(错误,java.lang.IllegalStateException:您应用的 AndroidManifest.xml google_maps_flutter 中的必需元数据标记不起作用

[英]Platform Exception (error, java.lang.IllegalStateException: A required meta-data tag in your app's AndroidManifest.xml google_maps_flutter not working

I added the package to my app putting the meta data with the API key and all that and it was working ok so I started working on other parts of my app and when I tried to use it again some time later it started giving me this exception:我将 package 添加到我的应用程序中,将元数据与 API 密钥和所有这些一起使用,它工作正常,所以我开始在我的应用程序的其他部分工作,当我尝试再次使用它时,它开始给我这个异常:

Unhandled Exception: Platform Exception(error, java.lang.IllegalStateException: A required meta-data tag in your app's AndroidManifest.xml未处理的异常:平台异常(错误,java.lang.IllegalStateException:您应用的 AndroidManifest.xml 中的必需元数据标记

its telling me to add the following to my AndroidManifest.xml:它告诉我将以下内容添加到我的 AndroidManifest.xml 中:

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

however i didn't need this line before and it was working just fine, why is it asking for it out of nowhere?但是我以前不需要这条线,它工作得很好,为什么它会突然要求它? I added it but now its crashing whenever it tries to load the map saying FATAL EXCEPTION: Thread-3.我添加了它,但现在它在尝试加载 map 时崩溃,说 FATAL EXCEPTION: Thread-3。 Can anyone help please?有人可以帮忙吗?

It looks like you are using some kind of Google Mobile Services (GMS) APIs in your app.看起来您正在应用中使用某种 Google 移动服务 (GMS) API。 Google Maps API is one of them.谷歌地图 API 就是其中之一。 As the error suggests, just add the meta-data to your AndroidManifest.xml to solve the problem.正如错误提示的那样,只需将元数据添加到您的 AndroidManifest.xml 即可解决问题。 If you read the docs on how to properly set up Google Maps API or other GMS APIs in your app, you can find that you have to define the meta-data on AndroidManifest.xml as well.如果您阅读了有关如何在您的应用程序中正确设置 Google Maps API 或其他 GMS API 的文档,您会发现您还必须在 AndroidManifest.xml 上定义元数据。

Hope this helps.希望这可以帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IllegalStateException:您应用的 AndroidManifest.xml 中的元数据标记没有正确的值 - IllegalStateException : The meta-data tag in your app's AndroidManifest.xml does not have the right value 应用程序AndroidManifest.xml中的必需元数据标记不存在。 - A required meta-data tag in your app's AndroidManifest.xml does not exist. 您应用的 AndroidManifest.xml 中的元数据标记没有正确的值。 - 谷歌地图 - The meta-data tag in your app's AndroidManifest.xml does not have the right value. - Google Maps 华为设备:您应用的AndroidManifest.xml中的元数据标签的值不正确 - Huawei devices: The meta-data tag in your app's AndroidManifest.xml does not have the right value 应用的AndroidManifest.xml中的元数据标记没有正确的值 - The meta-data tag in your app's AndroidManifest.xml does not have the right value Android 11 应用程序崩溃并显示“您应用程序的 AndroidManifest.xml 中的元数据标签没有正确的值。预期为 12451000,但找到了 4323000” - Android 11 app crash with "The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 12451000 but found 4323000" 应用程式的AndroidManifest中的类别片段和中继资料标记膨胀错误,并没有正确的值 - Error in inflating class fragment and meta-data tag in your app's AndroidManifest does not have the right value 将 google_analytics_adid_collection_enabled 元数据标记添加到 Cordova AndroidManifest.xml - Adding google_analytics_adid_collection_enabled meta-data tag to Cordova AndroidManifest.xml 每当我在元数据部分添加某个库并修改 androidmanifest.xml 时,flutter 应用程序都会崩溃 - Whenever I add a certain library and modify androidmanifest.xml on meta-data section, flutter app keeps crashing AndroidManifest.xml中的元数据标记没有正确的值 - The meta-data tag in AndroidManifest.xml does not have the right value
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM