Thursday, May 29, 2014

Ruboto error starting emulator

So, I've started dabbling with Ruboto: the Ruby way of doing Android.
Looks pretty cool. Fairly straightforward so far. Pretty glaring typo on this page makes me a little concerned, but whatevs. (Why do so many sites not make it easier to report typoes to the webmaster?)

Going by the ReadMe page, I enter this command to start up an emulator:
ruboto emulator -t android-19
That was fast, easily, painless and work. Hallelujah. I'm going to dinner.
I come back from dinner and decide to try some of the automated app generation stuff:
ruboto gen app --package com.dstrube.rubototest --path . --name RubotoTest --target android-19 --min-sdk android-19 --activity MainActivity
Again, easy, but this time not so effective. The generator says "." doesn't exist so it'll create it. Good luck with that, little buddy. So I run it again, this time specifying the folder RubotoTest. All good in the hood. 

Until I try running the emulator again (that I'd closed before dinner). Then I get this noise:

NAND: nand_dev_load_disk_state ftruncate failed: Invalid argument
savevm: unable to load section nand_dev

Searching the google for help gave me only instances where this was happening with Eclipse. Solution: close and reopen Eclipse. Not applicable here. Closing and reopening this emulator just gave the same error again. 

So here's the solution:
1- IF you were stupid enough to make the min sdk the same as the target sdk, I understand, but that was stupid. Do it again, but this time min-sdk = something like 10.
2- ruboto emulator -t android-18

Does closing and reopening the 18 emulator still work? Yes
Does trying to open the 19 emulator again still break? Yes

Is any of this a complete solution? No, but hopefully it'll help someone save a few minutes of hair pulling on this so they can pull hair on something else.

No comments:

Post a Comment