Running Google Maps v2 on the Android emulator

前端 未结 11 1805
一整个雨季
一整个雨季 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:19

    Please try the following. It was successfully for me.

    Steps:

    1. Create a new emulator with this configuration: AVD configuration

    2. Start the emulator and install the following APK files: GoogleLoginService.apk, GoogleServicesFramework.apk, and Phonesky.apk. You can do this with the following commands:

      adb shell mount -o remount,yourAvdName -t yaffs2 /dev/block/mtdblock0 /system
      adb shell chmod 777 /system/app
      adb push GoogleLoginService.apk /system/app/
      adb push GoogleServicesFramework.apk /system/app/
      adb push Phonesky.apk /system/app/
      

      Links for APKs:

      1. GoogleLoginService.apk
      2. GoogleServicesFramework.apk
      3. Phonesky.apk AKA Google Play Store, v.3.5.16
      4. Google Maps, v.6.14.1
      5. Google Play services, v.2.0.10
    3. Install Google Play services and Google Maps in the emulator

      adb install com.google.android.apps.maps-1.apk
      adb install com.google.android.gms-2.apk
      
    4. Download Google Play Service revision 4 from this link and extra to folder sdkmanager->extra->google play service.
    5. Import google-play-services_lib from androidsdk\extras\google\google_play_services.
    6. Create a new project and reference the above project as a library project.
    7. Run the project.

提交回复
热议问题