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

Android Emulator - Trouble creating user accounts(Android 模拟器 - 创建用户帐户时遇到问题)
本文介绍了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 模拟器 - 创建用户帐户时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How to target newer versions in .gitlab-ci.yml using auto devops (java 11 instead of 8 and Android 31 instead of 29)(如何在.gitlab-ci.yml中使用自动开发工具(Java 11而不是8,Android 31而不是29)瞄准较新的版本)
Android + coreLibraryDesugaring: which Java 11 APIs can I expect to work?(Android+core LibraryDesugering:我可以期待哪些Java 11API能够工作?)
How to render something in an if statement React Native(如何在If语句中呈现某些内容Reaction Native)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Using Firebase Firestore in offline only mode(在仅脱机模式下使用Firebase FiRestore)
Crash on Google Play Pre-Launch Report: java.lang.NoSuchMethodError(Google Play发布前崩溃报告:java.lang.NoSuchMethodError)