Issue
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.
Solution
Regarding your resolution changing question:
You need to configure your desired resolution in two places:
In the VirtualBox virtual machine configuration
- Shutdown the VM and VirtualBox.
- Use VBoxManage to configure a custom resolution:
VBoxManage setextradata "YourVMName" "CustomVideoMode1" "480x800x16"
(or any other resolution).
In the VM Grub Configuration
- Remonut the boot partition:
mount -o remount,rw /mnt
- Then, you can edit the
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.
Answered By - Rotemmiz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.