This app won't run unless you update Google Play Services (via Bazaar)

后端 未结 12 1847
长情又很酷
长情又很酷 2020-11-22 03:58

I\'m testing out the new Google Maps API V2 for Android, and I\'m getting this message when the app launches:

\"

相关标签:
12条回答
  • 2020-11-22 04:35

    I'm answering this question for the second time, because the solution I've tried that didn't work at first now works, and I can recreate the steps to make it work :)

    I also had a feeling that lack of Google Play Store is a culprit here, so I've tried to install Google Play Store to the emulator by advice on this link and this link combined. I've had some difficulties, but at the end I've succeeded in installing Google Play Store and tested it by downloading some random app. But the maps activity kept displaying the message with the "Update" button. That button would take me to the store, but there I would get a message about "item not found" and maps still didn't work. At that point I gave up.

    Yesterday, I've fired up the same test app by accident and it worked! I was very confused, but quickly I've made a diff from the emulator where it's working and new clean one and I've determined two apps on the working one in /data/app/ directory: com.android.vending-1.apk and com.google.android.gms-1.apk. This is strange since, when I were installing Google Play Store by instructions from those sites, I was pushing Phonesky.apk, GoogleServicesFramework.apk and GoogleLoginService.apk and to a different folder /system/app.

    Anyway, now the Android Google Maps API v2 is working on my emulator. These are the steps to do this:


    Create a new emulator

    • For device, choose "5.1'' WVGA (480 x 800: mdpi)"
    • For target, choose "Android 4.1.2 - API level 16"
    • For "CPU/ABI", choose "ARM"
    • Leave the rest to defaults

    These are the settings that are working for me. I don't know for different ones.


    Start the emulator


    install com.android.vending-1.apk and com.google.android.gms-1.apk via ADB install command


    Google Maps should work now in your emulator.

    0 讨论(0)
  • 2020-11-22 04:37

    I've been trying to run an Android Google Maps v2 under an emulator, and I found many ways to do that, but none of them worked for me. I have always this warning in the Logcat Google Play services out of date. Requires 3025100 but found 2010110 and when I want to update Google Play services on the emulator nothing happened. The problem was that the com.google.android.gms APK was not compatible with the version of the library in my Android SDK.

    I installed these files "com.google.android.gms.apk", "com.android.vending.apk" on my emulator and my app Google Maps v2 worked fine. None of the other steps regarding /system/app were required.

    0 讨论(0)
  • 2020-11-22 04:38

    According to a discussion with Android Developers on Google+, running the new Map API on the emulator is not possible at the moment.

    (The comment is from Zhelyazko Atanasov yesterday at 23:18, I don't know how to link directly to it)

    Also, you don't see the "(via Bazaar)" part when running from an actual device, and the update button open the Play Store. I am assuming Bazaar is meant to provide Google Play Services on the Android emulator, but it is not ready yet...

    0 讨论(0)
  • 2020-11-22 04:40

    UPDATE

    The Google maps API v2 is now installed on the latest Google system images (api:19 ARM or x86).
    So your application should just work with the new images. There is no need to install these files.

    I've been trying to run an Android Google Maps V2 application under an emulator and once I finally got Google Play Services running, I updated my SDK to Google Play Services revision 4, and my emulator wouldn't run my application any more.

    I have now worked out how to update my emulator from my transformer tablet. (You won't need a tablet as you can download the files below.)

    I used Titanium Backup to backup my Asus Eee Pad Transformer (TF101) and then grabbed the com.android.vending and the com.google.android.gms APK files from the backup.

    I installed these on an emulator configured with platform: 4.1.2, API Level: 16, CPU Intel/Atom x86) and my Google Maps V2 application works again.

    That was all .. none of the other steps regarding /system/app were required.

    My application only uses the Google Maps API, no doubt, more steps are required if you use other Google Play services.

    New files for latest Google Play services:

    • com.google.android.gms-20140218.apk

    • com.android.vending-20140218.apk

    Same instructions as before: Create a new emulator with any CPU/ABI, a non-Google API target (versions 10-19 work) and GPU emulation on or off, and then install the files:

    adb install com.android.vending-20140218.apk
    adb install com.google.android.gms-20140218.apk
    

    If you are upgrading an existing emulator then you might need to uninstall previous versions by:

    adb uninstall com.android.vending
    adb uninstall com.google.android.gms
    

    That's all.

    0 讨论(0)
  • 2020-11-22 04:40

    From Android SDK Manager, install: Extras: Google Play services

    0 讨论(0)
  • 2020-11-22 04:42

    I've created a (German) description how to get it working. You basically need an emulator with at least API level 9 and no Google APIs. Then you'll have to get the APKs from a rooted device:

    adb -d pull /data/app/com.android.vending-2.apk
    adb -d pull /data/app/com.google.android.gms-2.apk
    

    and install them in the emulator:

    adb -e install com.android.vending-2.apk
    adb -e install com.google.android.gms-2.apk
    

    You can even run the native Google Maps App, if you have an emulator with at least API level 14 and additionally install com.google.android.apps.maps-1.apk

    Have fun.

    0 讨论(0)
提交回复
热议问题