Running Google Maps v2 on the Android emulator

前端 未结 11 1609
一整个雨季
一整个雨季 2020-11-22 10:32

I\'ve tried to implement Google Maps v2 in my Android application, but unfortunately instead of maps I get this message:

11条回答
  •  南笙
    南笙 (楼主)
    2020-11-22 11:12

    I have successfully run our app, which requires Google Maps API 2, on an AndroVM virtual machine.

    AndroVM does not come with Google Maps or Google Play installed, but provides a modified copy of the Cyanogen Gapps archive, which is a set of the proprietary Google apps installed on most Android devices.

    The instructions, copied from the AndroVM FAQ:

    How can I install Google Apps (including the Market/Play app) ?

    • Download Google Apps : gapps-jb-20121011-androvm.tgz [basically the /system directory from the Cyanogen gapps archive without the GoogleTTS app which crashes on AndroVM]
    • Untar the gapps…tgz file on your host – you’ll have a system directory created
    • Get the management IP address of your AndroVM (“AndroVM Configuration” tool) and do “adb connect x.y.z.t”
    • do “adb root”
    • reconnect with “adn connect x.y.z.t”
    • do “adb remount”
    • do “adb push system/ /system/”

    Your VM will reboot and you should have google apps including Market/Play.

    You won’t have some Google Apps, like Maps, but they can be downloaded from the Market/Play.

    So follow those instructions, then just install Google Maps using Google Play!

    Some great side effects of using a VM rather than the emulator:

    • Vastly superior general performance
    • OpenGL acceleration
    • Google Play support

    The only bump in the road so far has been lack of multi-touch gestures, which is a bummer for a mapping app! I plan to work around this with a hidden UI mechanism, so not such a huge problem.

提交回复
热议问题