[英]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.