Android,是否可以在任何类型的操作系统上运行 Dalvik VM 以运行 Android 应用程序?
我有一些操作系统,例如 Windows 7 和 Linux。 是否可以在Win7上运行Dalvik,然后运行Android应用程序或游戏?
谢谢
I have some operating systems such as Windows 7 and Linux.
Is it possible to run Dalvik on this Win7 and after that running an Android application or game?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
一种解决方案是本地安装 Android-x86(适用于 Intel 或 AMD CPU 的 Android)或在虚拟机。如果您只想玩一些游戏而不是 Windows 和 Android 双启动,您可以使用优秀的 Android 模拟器 Bluestacks 。只是警告,根据您的硬件(或虚拟硬件),一个版本的 Android-x86 可能比另一个版本更好,您必须尝试一下。在虚拟机中,很可能无法正确检测到虚拟显卡,因此您必须在 VESA 模式下运行它。我建议在运行之前编辑启动项并添加命令:
然后选择图形模式来运行 Android-x86。这会强制使用特定的 VESA 模式,并且大多数时候图形会在屏幕上以正确的颜色正确呈现。当然,在这种情况下,你的性能会受到影响。某些游戏可能需要启用开发人员选项,然后强制软件渲染才能运行它们。
One solution is to install Android-x86 (Android for Intel or AMD CPUs) either natively or in a virtual machine. If you only want to play some games and not to dual-boot with Windows and Android, you can use the excellent Android emulator Bluestacks. Just a warning, depending on your hardware (or virtual hardware) one version of Android-x86 may work better than another, you have to try. In a virtual machine most likely the virtual graphics card won't be detected properly, so you have to run it in VESA mode. I recommend editing the boot entry before running it and adding the commands:
Then choose graphics mode to run Android-x86. This forces a specific VESA mode and most of the times the graphics are presented properly with correct colors on screen. Of course in that case you have a performance penalty. Some games may need to enable Developer Options and then force software rendering to be able to run them.
Android 的虚拟机与操作系统(Linux)紧密集成。所以,在Windows上运行它是不可能的。
Android系统中的底层组件(操作系统和本机库)提供了许多服务,而Dalvik只是为了Java程序的使用而“翻译”这些服务。因此,将 Dalvik 移植到 Windows 可能非常困难,而且毫无意义。
Android's virtual machine is tightly integrated with the OS (Linux). So, it is impossible to run it on Windows.
The lower-level components (OS and native libraries) in the Android system provide many services that Dalvik merely "translates" for the consumption of Java programs. So porting Dalvik to Windows is probably very hard and rather pointless.
dalvik 绝对可以在(普通)linux 上运行,并且很可能它也可以在 windows 上的 cygwin 环境中运行。
至于能够运行Android应用程序,则要复杂一些。然而,AOSP 源确实有一个“模拟器”构建,它就是这样做的 - 在主机上本机运行 dalvik 并提供 Android 框架等,用于运行 Android 应用程序。
但请记住,模拟器环境并未得到积极维护,并且可能需要相当多的“爱”才能使其正常工作。
dalvik can definitely run on (normal) linux, and it's likely it can also run in a cygwin environment on windows.
As for being able to run Android applications, that is quite a bit more complicated. However, the AOSP source does have a "simulator" build, which does just that - runs dalvik natively on the host machine and provides an android framework etc, for running android applications.
Keep in mind however that the simulator environment isn't actively maintained, and will probably require quite a bit of "love" to get it to work.
您可以使用 VirtualBox 在 PC 上安装 Android。查看本教程。
You can install Android on your PC with VirtualBox. Check out this tutorial.