Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
308 views
in Technique[技术] by (71.8m points)

Running google map application on Android Emulator

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 enter image description here

In the logcat I can see following error

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

and the following warning

eglSurfaceAttrib not implemented

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 ?

Thanks in advance.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

  1. Create avd and start emulator

  2. 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
  3. 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 devices
    • adb install com.android.vending-20130716
    • adb install com.google.android.gms-20130716
  4. Import google-play-services_lib project which is present at project location and add it to your project.
  5. Restart emulator and clean your project and run it through emulator.

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

Running Google Maps v2 on the Android emulator

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...