本文介绍了在 Android 模拟器上运行谷歌地图应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序使用 Google Maps v2.此应用程序在 Android 驱动的设备上成功运行.我试图在 Android 模拟器上运行相同的应用程序.我的模拟器的目标是 Google APIs API Level 18 但这里的问题是应用程序在模拟器上运行但地图没有在地图片段上绘制,请参见下图

My application uses Google Maps v2. This application successfully working on Android powered device. I tried to run the same application on Android emulator. The target of my emulator is Google APIs API Level 18 but the problem here is application runs on the emulator but map is not drawing on the map fragment, please see the image below

在logcat中我可以看到以下错误

In the logcat I can see following error

Google Maps Android API v2 only supports devices with OpenGL ES 2.0 and above

以及以下警告

eglSurfaceAttrib not implemented

我在 Manifest 中添加了这个功能

I have added this feature in Manifest

  <uses-feature
    android:glEsVersion="0x00020000"
    android:required="true" />

有人知道如何在模拟器上运行这个简单的应用程序吗?

Does anybody have an idea how to run this simple application on the emulator ?

提前致谢.

推荐答案

我终于在我的模拟器中得到了地图.我按照这些步骤来实现它.

I got finally map in my emulator. I followed these steps to achieve it.

  1. 创建avd并启动模拟器

  1. Create avd and start emulator

转到 Android SDK 中的平台工具路径并将这些 apk 放入其中.

Go to platform tools path present in Android SDK and put these apk's in it.

  • com.android.vending-20130716
  • com.google.android.gms-20130716
  • adb 设备
  • adb install com.android.vending-20130716
  • adb 安装 com.google.android.gms-20130716

就是这样.:)您可以从以下链接下载上面的apk

That's it. :)you can download above apk's from following link

在 Android 模拟器上运行 Google Maps v2

这篇关于在 Android 模拟器上运行谷歌地图应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-29 14:21
查看更多