在 Linux 上为 Ruboto 设置 Android 模拟器的最佳方法?

发布于 2024-12-26 10:59:10 字数 198 浏览 3 评论 0原文

Ruboto 在 Google 或其他 Android 模拟器(以最快的模拟器为准)中需要哪些资源配置设置?

有效设置 Google 的 Android 模拟器的答案是存在的,但他们不考虑 Ruboto。 Ruboto 网站不讨论设置模拟器。

What resource configuration settings does Ruboto require in Google's or another Android emulator (whichever emulator is fastest)?

Answers exist for efficiently setting up Google's Android emulator, but they don't consider Ruboto. The Ruboto site doesn't discuss setting up an emulator.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清君侧 2025-01-02 10:59:10

Ruboto 应用程序的工作方式与常规 Android 应用程序相同,但添加了 JRuby jar 以支持运行 Ruby 代码。总体而言,与 Java Android 应用程序相比,Ruboto 应用程序不需要任何特殊设置。

Ruboto 应用程序与所有 JRuby 应用程序一样,比普通 Java 应用程序使用更多的内存和 CPU。使用“最大 VM 应用程序堆大小”为模拟器提供更多堆将使开发更加容易,但您需要记住,用户的目标设备的设置可能会有所不同。我使用的值是 48。此外,您可以将“设备内存大小”设置为 512,以确保足够的内存总量。

从 Android 3, api level 11 开始,您的应用程序可以使用应用程序标记的 android:largeHeap="true" 属性在 AndroidManifest.xml 中请求更多内存。 Ruboto 生成器会自动为您设置该值,但您可以验证是否已为您的应用程序设置。通过将此属性设置为“true”,您的应用程序可以增加 256 MB 的堆。

Ruboto apps work as regular Android apps, but add the JRuby jars which enable running your Ruby code. Overall you don't need any special settings for Ruboto apps vs Java Android apps.

Ruboto apps, like all JRuby apps, use more memory and like more CPU than plain Java apps. Giving your emulator more heap using the "Max VM application heap size" will make development easier, but you need to keep in mind that the settings for the target devices of your users may vary. I use a value of 48. Besides that you can set your "Device ram size" to 512 to ensure enough memory total.

Since Android 3, api level 11, your app can request more memory in the AndroidManifest.xml using the android:largeHeap="true" attribute of the application tag. This is automatically set for you by the Ruboto generators, but you can verify that is is set for your application. By setting this attribute to "true", your app can grow a heap of 256 MB.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文