57

I've updated my sdk to the latest version (android 4.4) and I started the emulator, but now it seems not possible to rotate the screen with CTRL+F11, the screen change but all the applications don't change. I don't know if it's a related issue but I can see that even if I created a new emulator with menù hw button, now all the applications have the overflow button.

greywolf82
  • 21,813
  • 18
  • 54
  • 108

9 Answers9

59

These appear to be bugs in the Android 4.4 emulator. You may wish to track the issues that I filed regarding the orientation change bug and the overflow affordance bug.

Thanks for pointing these out!

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • And the new runtime compiler ART breaks the emulator, too: http://www.xda-developers.com/android/new-runtime-compiler-in-android-4-4/ – mreichelt Nov 01 '13 at 12:51
  • 2
    @mreichelt: Well, that's something you have to specifically enable in the emulator and is not part of normal Android app development today, the way orientation changes and the overflow are. That being said, thanks for pointing this out, if for no other reason than helping to explain who Art is that I have seen mentioned in various tweets. :-) – CommonsWare Nov 01 '13 at 13:19
  • It seems there are a lot of bugs in the SDK. You can see for example: http://stackoverflow.com/questions/19725265/license-error-with-android-4-4-emulator. In addition if I open the map (Google map api v2) in my application then it crashes with segmentation fault. But my apps works perfectly on my device and on 4.3 emulator. Google what are you doing? – greywolf82 Nov 01 '13 at 14:44
  • Can confirm the rotation problem faced it today too, also the ART bug. – Rolf ツ Nov 02 '13 at 19:08
  • 9
    Yeah, found out in the first five minutes ('cause that's how long it takes to load the 4.4. KitKat emulator on my PC) that **screen orientation** using Ctrl+F11 and the emulator's **Menu** button **don't work**. Shame on Google to have missed these bugs during testing... – ChuongPham Nov 29 '13 at 17:41
  • 1
    This also happens with the L Developer Preview emulator. – IgorGanapolsky Jul 03 '14 at 18:35
  • @CommonsWare, https://code.google.com/p/android/issues/detail?id=61671#c26 says "**Fixed** in api 22". – Pacerier Jul 01 '15 at 09:44
54

There appears to be a bug in the emulator as described by CommonsWare, however, if you desperately need to debug an app in landscape mode on the 4.4 emulator you can:

  1. Start the Camera app on the emulator which will rotate the screen.
  2. Now exit the app, the home screen should now be sideways.
  3. Pressing Ctrl + F11 will do the trick. (Ctrl + fn + F11 on mac).
VM4
  • 6,321
  • 5
  • 37
  • 51
13

Until it is fixed I use this free application "Set Orientation". Install the apk into emulator using adb install.

vldmrrr
  • 748
  • 6
  • 8
7

I have found that this bug depends on which device type I select for the virtual-machine. If I set the device type as a "Nexus 7", it won't allow rotations. But if I set the device type as a generic 7" tablet, with all of the same options, rotations will work fine.

genixpro
  • 503
  • 1
  • 5
  • 8
  • 2
    So, it's still a bug. – ChuongPham Nov 29 '13 at 17:43
  • I don't notice any difference. For me, the only different in using the 7" tablet device is that it defaults to landscape. Otherwise, it has the same behavior as phone devices: the window will physically rotate, but the layout doesn't adjust. – Edward Brey Dec 11 '13 at 18:13
  • This worked for me, finally. Took me hours googling. I've tried 4.4.2, 4.3.1, 4.1.2 system images with no avail. Using idea on ubuntu 14.04. – Will Dec 28 '14 at 13:26
1

In manifestfile.xml can put android:screenOrientation="landscape". When it has been Loaded you will see every app in landscape mode

ivanrove
  • 11
  • 1
1

There is a work around for this. It seems the settings from the GUI isn't saved to the ini files. I had to manually edit fields "hw.keyboard=no" in both config.ini & hardware-qemu.ini within your avd directory.

idwebmedia
  • 11
  • 1
  • 1
    Why does the hw.keyboard setting have an effect? – IgorGanapolsky Jul 03 '14 at 18:39
  • I have no idea but it does for some reason. When I first created my custom avd everything worked fine as I had all nonessential options disabled. When I went back to edit it later I noticed once I turned it on it changed the orientation of the OS screen not the device. i was still in portrait but the interface was in landscape vertical. That's when I noticed my changes in the GUI weren't being applied to the ini files. I'm not sure if both need to be changed but I did it to them anyways and it reverted back to normal. – idwebmedia Jul 03 '14 at 20:18
0

As a workaround, I cloned the device, swapped the width/height in the clone and unchecked portrait. Then launched my avd based on the cloned landscape version. Maybe that could work for you?

  • What if you want to do an onConfigurationChange test to also test how onSaveInstanceState and onrRestoreInstanceState methods are working? Of course with your solution you can test the layouts written for different orientation for the same fragment or activity.. – Abhinav Saxena May 07 '14 at 13:05
0

I ran into the same issue when using the emulator running Android 5.0.1. However, I was able to resolve by using the emulator with Intel x86 Atom system image instead of the Intel x86 Atom_64 system image.

Julio Feferman
  • 2,658
  • 3
  • 15
  • 26
-1

I have found a solution to this problem -

  • Create emulator with whatever setting you want but set the Target to be less then Android 4.4.

For example -

I set it to the following -->

enter image description here

NOTE:

Because I want to use Android 4.4 with Google Maps API so I used Android 4.2.2 with Google Maps API here.

  • After creating the AVD, start it and lets get it started completely.

  • Now come back to this AVD and edit it. Here you set the Target to Android 4.4 with Google Maps API.

For example -

I set it to the following -->

enter image description here

  • Now start the application and rotate any way you want. It worked great!
sjain
  • 23,126
  • 28
  • 107
  • 185