Reputation: 1225
I've developed an Android application but when I try to run it in the emulator via Eclipse, the emulator always takes a LONG time to load. I've decided to create an Android virtual machine on VirtualBox, I've installed AndroBOX-2.3.r.1-generic
, it works fine and faster, but when I try to run my app, I have a RuntimeException: unable to start activity ComponentInfo: android.view.InflateException: Binary XML file line #2: Error inflating class GridLayout
.
I hope that the problem could be solved if I run the Android virtual machine with a custom resolution. I have developed my app for a 10.1' WXGA800 tablet (Theme.Holo). How can I find the useful resolution data to edit the .vbox configuration file?
<ExtraData>
<ExtraDataItem name="GUI/LastCloseAction" value="?"/>
<ExtraDataItem name="GUI/LastGuestSizeHint" value="?,?"/>
<ExtraDataItem name="GUI/LastNormalWindowPosition" value="?,?,?,?"/>
<ExtraDataItem name="CustomVideoMode1" value="?x?x?"/>
</ExtraData>
Thanks a lot.
Upvotes: 2
Views: 9137
Reputation: 7971
Regarding your resolution changing question:
You need to configure your desired resolution in two places:
In the VirtualBox virtual machine configuration
VBoxManage setextradata "YourVMName" "CustomVideoMode1" "480x800x16"
(or any other resolution).In the VM Grub Configuration
mount -o remount,rw /mnt
menu.lst
file: vi /mnt/grub/menu.lst
Default parameters are: quiet root=/dev/ram0 androidboot_hardware=eeepc acpi_sleep=s3_bios,s3_mode DPI=240 SRC=/android-2.3-RC1
add UVESA_MODE=480x800
to the parameter line, like so: quiet root=/dev/ram0 androidboot_hardware=generic_x86 acpi_sleep=s3_bios,s3_mode DPI=240
UVESA_MODE=480x800
SRC=/android-2.3-RC1
Reboot your machine, it should now boot with the custom resolution you defined.
Upvotes: 8