Android 模拟器 - 创建用户帐户时遇到问题

时间:2023-04-23
本文介绍了Android 模拟器 - 创建用户帐户时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我需要一个或两个 Android 模拟器中的用户帐户,以便我可以测试我的应用的一些短信/邮件功能.问题是当我尝试在模拟器中执行此操作时:

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:

设置 --> 帐户和同步 --> 添加账户 --> (my_gmail_account/password) --> 下一步

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

我收到消息设置无法完成 - 无法打开与服务器的连接."

我的模拟器运行良好能够通过它的浏览器连接到互联网.所以不知道为什么它不起作用.有人遇到过这个问题吗?

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?

谢谢!

推荐答案

@Varun 的解决方案适合我.有两件事必须正确配置:模拟器和您的 eclipse 项目.

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

要设置模拟器,您必须创建一个新模拟器.不要选择 Android 目标,而是选择您需要的 Google API 目标(此目标包括 Android 平台,但Android"并未出现在其标题中).见截图:

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:

该模拟器现在应该可以登录 gmail 帐户了.

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

要配置您的 Eclipse 项目,请在包资源管理器中右键单击该项目.从下拉菜单中选择属性".单击属性窗口左侧的Android",然后选择您为模拟器选择的相同 Google API 目标.见截图:

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:

您还应该确保选择了正确的模拟器来运行项目.为此,请选择项目属性窗口左侧的运行/调试设置".编辑启动设置,然后在目标"选项卡下选择适当的模拟器 (AVD).

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.

这对我有用!

这篇关于Android 模拟器 - 创建用户帐户时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

上一篇:数据目录在Android中没有读/写权限 下一篇:在 Android 中从一个活动移动到另一个活动

相关文章