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 中我可以看到以下错误
Google Maps Android API v2 only supports devices with OpenGL ES 2.0 and above
以及以下警告
eglSurfaceAttrib not implemented
我已经在Manifest中添加了这个功能
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
有人知道如何在模拟器上运行这个简单的应用程序吗?
提前致谢。
我终于在模拟器中得到了地图。我按照以下步骤来实现它。
创建avd并启动模拟器
-
转到 Android SDK 中存在的平台工具路径并将这些 apk 放入其中。
- com.android.vending-20130716
- com.google.android.gms-20130716
- Install these apk's one by one by going to platform tools path by using command prompt(shift+Right click-->open command window here).Follow these commands
- 亚行设备
- adb 安装 com.android.vending-20130716
- adb 安装 com.google.android.gms-20130716
- 导入位于项目位置的 google-play-services_lib 项目并将其添加到您的项目中。
- 重新启动模拟器并清理您的项目并通过模拟器运行它。
就是这样。 :)
您可以从以下链接下载以上 apk
在 Android 模拟器上运行 Google 地图 v2 https://stackoverflow.com/questions/14040185/running-google-maps-v2-on-android-emulator
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)