Search code examples
android-emulatorinstallationruboto

best way to set up an Android emulator on Linux for 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.


Solution

  • 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.