8

I'm using x86 Intel Android emulator for Android Apps develop.

but when I use google croud messaging API,error occured.

java.lang.UnsupportedOperationException: Device does not have package com.google.android.gsf

if switch emulator which using Google APis,error is clear.but very slowly....

I've searched same situation,and I found for Google maps API.

How to create avd with google api for Intel x86 atom image?

http://38911bytes.blogspot.de/2012/03/how-to-use-google-maps-api-in-android.html

but these article is only Google Maps Problem,not for GCM API.

is there solution?

Community
  • 1
  • 1
dmnlk
  • 2,995
  • 2
  • 25
  • 30
  • Did you get anywhere with this, I'm looking at the same problem now, it's not clear what to do for gcm as there is no gsm jar in /system/framework – shmish111 May 25 '13 at 23:03
  • First,you must create emu with GoogleAPI ,run this connect adb. next,you pull file from /system/app/GoogleServicesFramework.apk. – dmnlk May 26 '13 at 08:42
  • And,you create x86 emu.you push GoogleServicesFramework.apk to same dir.. – dmnlk May 26 '13 at 08:43
  • After creating a google api image, when I start the device I now get errors and a message Unfortunately Google Services Framework has stopped. The following is in logcat: – shmish111 May 27 '13 at 10:38
  • 05-27 10:32:54.699 1375-1375/? E/BluetoothAdapter: Bluetooth binder is null 05-27 10:32:55.590 1631-1631/? E/Trace: error opening trace file: No such file or directory (2) 05-27 10:32:56.709 1523-1657/? E/GTalkService: getAccountForAndroidId: get ANDROID_ID returned 0! 05-27 10:33:01.249 1693-1693/? E/Trace: error opening trace file: No such file or directory (2) – shmish111 May 27 '13 at 10:38
  • your problem is not about x86 emu. – dmnlk May 28 '13 at 04:43
  • could you elaborate, I'm pretty stuck? – shmish111 May 28 '13 at 15:28
  • http://stackoverflow.com/questions/2615853/android-2-x-vs-google-apis-for-android-avd-setup – dmnlk May 29 '13 at 00:47

3 Answers3

5

I would recommend you use AndroVM.

AndroVM
(source: androvm.org)

It's actually x86 Android VM images of VirtualBox (with Google APIs), where you can deploy & test your app efficiently. In my opinion, it's about as fast as real Android device, and makes me much productive while developing Android apps.

To set up AndroVM, you can check the official documentation here which I think it's quite clear.

And you can grab your VM images from download page, and don't forget to download the one with gapps & houdini.

I just checked my installation, and found GoogleServicesFramework.apk under /system/app. So it should meet your need.

Community
  • 1
  • 1
dlackty
  • 1,861
  • 14
  • 17
1

You can now use Genymotion, AndroVM has been deprecated.

You can launch the emulator from Eclipse with the plug-in and Android Studio I guess.

About the question I had this problem... follow the first answer (image with google apps) then create a google account and open Play Store so it can update because GCM need Google Play Services.

That's it.

jamachad
  • 70
  • 1
  • 8
0

This Happens in Case of using wrong emulator

the default emulator is not configured to run gcm API, You use Emulator with Google APIs.

You need to create new Emulator selecting Google API level xx, and the run the project and on that emulator, hope it will work correctly.

QAMAR
  • 2,684
  • 22
  • 28