为Galaxy S8创建模拟器? -Android Studio [英] Creating an emulator for Galaxy S8? - Android Studio

查看:132
本文介绍了为Galaxy S8创建模拟器? -Android Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建一个新的硬件配置文件,以尝试为Galaxy S8/S8 +制作并仿真.我将屏幕尺寸设置为5.8/6.2英寸(取决于S8还是S8 +,尽管实际上这似乎并不会影响仿真器),并且将屏幕分辨率设置为1440 x 2960(与设备类似).仿真器看起来与实际设备上的显示完全不同.在真实的S8 +上测试我的应用程序后,发现它的布局不佳,但在模拟器上似乎组织得井井有条,而且我注意到它在Nexus 6模拟器(xxxhdpi)上使用了调暗器.现在,所用的dimens值已不是什么大问题,因为考虑到Nexus 6不再生产,我很乐意淘汰它.

I create a new hardware profile in an attempt to make and emulator for the Galaxy S8/S8+. I set the screen size to 5.8/6.2 inches (depending on whether S8 or S8+, despite the fact this doesn't appear to affect emulator anyway), and the screen resolution to 1440 x 2960, like the device. The emulator appears nothing like it does on the real device. Testing my app on a real S8+ shows it to be laid out poorly, but on the emulator it appear to be relatively organised, and I noticed it uses the dimens for my Nexus 6 emulator (xxxhdpi). Now the dimens values used isn't a big deal, because I'm happy to phase out the Nexus 6 considering it's no longer in production.

因此,我在启动器Java类中添加了一些代码,这些代码使我获得了模拟器的尺寸,这是从S8模拟器中获得的代码:{density=3.5, width=1440, height=2792, scaledDensity=3.5, xdpi=560.0, ydpi=560.0} 除了高度说2792而不是2960(我想这是要发生)的事实之外,我相信我看到了这个问题-密度为3.5.令人怀疑的是,它与Nexus 6的密度相同.因此,我创建的仿真器不适用于Galaxy S8,这在我与真实S8 +的比较中可以明显看出,后者以失真的方式显示了我的应用程序.据我所知,Galaxy S8的密度为4,而不是3.5. IDE说该设备具有560dpi.现在,我需要能够创建一个密度为4的仿真器,并且已经制定了相同的规格.我怎样才能做到这一点?如何在不使用真实物品的情况下测试Galaxy S8? IDE没有为此设备提供预配置的模拟器.

So I add some code to my launcher Java class that that gets me the dimensions of the emulator, here is what I get from my S8 emulator: {density=3.5, width=1440, height=2792, scaledDensity=3.5, xdpi=560.0, ydpi=560.0} Besides the fact the height says 2792 instead of 2960 (I assume this is meant to happen), I believe I see the issue - the density is 3.5. As suspected, this is the same density as the Nexus 6. So the emulator I'm creating is not for the Galaxy S8, and this is evident in my comparison to a real S8+ which displayed my app in a distorted manner. As far as I'm aware, the Galaxy S8 has a density of 4, not 3.5. The IDE says the device has 560dpi. Now I need to be able to create an emulator with a density of 4, and the same specs I've already put down. How can I do this? How can I test for the Galaxy S8 without using the real thing? There isn't a preconfigured emulator for this device provided by the IDE.

非常感谢.

推荐答案

没有预配置的模拟器.根据我的经验,即使您尝试使用匹配的设备配置进行创建,也不会有太大的用处,因为它仍然可以运行普通的android系统.

There is no preconfigured emulator. As per my experience, even if you try to create with matching device configuration it won't be much of use as it will still run stock android.

因此,我发现三星提供了像Firebase这样的在线测试实验室.

So, I found that Samsung provides online test lab like firebase.

您可以转到 http://developer.samsung.com/rtlLanding.do 并一探究竟.如果您没有开发者帐户,他们会免费提供5分钟的时间.

You can go to http://developer.samsung.com/rtlLanding.do and check it out. They give 5 minutes free if you don't have developer account.

根据三星,您可以获得以下内容:

As per Samsung, you can get the following:

    每天为每个Samsung Developer用户提供20美元的信用.
  • 获得1个学分,用户可以使用远程测试实验室服务15分钟.
  • 最少预订:30分钟(2个学分)
  • 最长预订:每天10小时(40个学分)
  • 20 credits are provided to each Samsung Developer user every day.
  • With 1 credit, users can use the Remote Test Lab service for 15 minutes.
  • Minimum reservation: 30 minutes (2 credits)
  • Maximum reservation: 10 hours a day (40 credits)

更多详细信息: http://developer.samsung.com/remotetestlab/rtlAboutRTL.action

这篇关于为Galaxy S8创建模拟器? -Android Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆