Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Emulator - Trouble creating user accounts

I need a user account or two in my Android Emulator so that I can test some texting/mailing function of my app. The trouble is that when I try to do this in the emulator:

Settings --> Accounts & sync --> Add account --> (my_gmail_account/password) --> Next

I get the message "Setup could not finish - Unable to open connection to server."

My emulator works fine & is able to connect to internet through it's browser. So not sure why it is not working. Has anyone run across this problem?

Thanks!

like image 592
OceanBlue Avatar asked Jul 15 '10 23:07

OceanBlue


People also ask

Why is my Android Emulator not working?

If the Android Emulator does not start properly, this problem is often caused by problems with HAXM. HAXM issues are often the result of conflicts with other virtualization technologies, incorrect settings, or an out-of-date HAXM driver. Try reinstalling the HAXM driver, using the steps detailed in Installing HAXM.

How do I give permission to an emulator?

So on Emulator, you just hit the run button and it installs automatically, that's why you are thinking it is not asking permission. if you go into Settings->Applications->YourApp you will see the details of the permission your app will use.

Can apps detect Android emulator?

There is no official API in iOS or Android to detect an emulator. Therefore, several proprietary checks have to be done by the RASP system.


2 Answers

@Varun's solution works for me. There are two things that must be configured correctly: the emulator and your eclipse project.

To set up the emulator, you'll have to create a new one. Instead of selecting an Android target, select the Google APIs target that you need (this target includes the Android platform, but "Android" doesn't appear in it's title). See screenshot:

alt text

That emulator should now be able to sign into a gmail account.

To configure your eclipse project, right click the project in the package explorer. Select "Properties" from the dropdown menu. Click "Android" on the left of the properties window, and select the same Google APIs target that you selected for your emulator. See screenshot:

alt text

You should also make sure that the correct emulator is selected to run the project. To do this, select "Run/Debug Settings" on the left of the project properties window. Edit the launch settings, and select the appropriate emulator (AVD) under the "Targets" tab.

This worked for me!

like image 82
CharlieMezak Avatar answered Oct 04 '22 04:10

CharlieMezak


I know this might be looong overdue, but if you're using ICS emulator, you need to push GoogleServicesFramework.apk and GoogleLoginService.apk. After that you can add user accounts.

like image 28
Piotr Buda Avatar answered Oct 04 '22 02:10

Piotr Buda