java - Android: Is it possible to use Google Maps API on emulator?
问题描述
I'm trying to use Google Maps API on emulator but I'm struggling with it. I already set up the API key (I set the package name and SHA-1 on Google console as well) but this error happens.
Here is AndroidManifest.xml
:
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
Google Maps Android API: Google Maps Android API v2 only supports devices with OpenGL ES 2.0 and above
Seems like Nexus 5 cannot be used for the Google Maps API on emulator because Emulated Performance is needed to specify to use the Google Maps API.
So I tried to use Nexus 4 instead because I can specify Emulated Performance: Graphics for the device but this error happens on the display.
This App won't run until you update Google Play Services.
I looked up this error and all the answers to this error are kind of old so I cannot understand how I can configure it correctly.
How can I fix these errors? Has anyone beeen successful in using the API on emulator recently?
解决方案
推荐阅读
- android - 无法使用证书 (.cer) 验证签名 XML
- angular - TypeError:无法读取未定义的属性'of'
- c# - 另一个“运行所选代码生成器时出错:”和“包还原失败。回滚包更改“(解决方案名称)
- html - 使用 CSS 在图像上居中对齐内容
- javascript - 慢速模式命令
- jenkins - github 操作 - 结帐操作中的问题
- reactjs - 他们有什么方法可以访问从 shell 脚本到 React JS 应用程序的参数吗?
- excel - 复制粘贴使用范围的列
- kotlin - MutableStateFlow 类在哪里?
- reactjs - 在 redux 中进行循环调度是否正确?