Android Emulator Shortcuts

When you’re working with the built-in Android emulator for Android Studio you have to use some button from the physical device to test your app, such as ‘volume down’ or ‘lock’.

Here is a short list of the available shortcuts for the emulator:

Main Device Keys
Home Home Button
F2 Left Softkey / Menu / Settings button (or `Page up`)
Shift+f2 Right Softkey / Star button (or Page down)
Esc Back Button
F3 Call/ dial Button
F4 Hang up / end call button
F5 Search Button
Other Device Keys
Ctrl+F5 Volume up (or + on numeric keyboard with Num Lock off)
Ctrl+F6 Volume down (or - on numeric keyboard with Num Lock off)
F7 Power Button
Ctrl+F3 Camera Button (or Ctrl+5 on numeric keyboard with Num Lock off)
Ctrl+F11 Switch layout orientation portrait/landscape backwards (or 7 on numeric keyboard with Num Lock off)
Ctrl+F12 Switch layout orientation portrait/landscape forwards (or 9 on on numeric keyboard with Num Lock off)
F8 Toggle cell network
F9 Toggle code profiling (requires --trace startup option)
Alt+Enter Toggle fullscreen mode
F6 Toggle trackball mode
Del Enter trackball mode while key is pressed
4/8/6/2 DPad left/up/right/down (numeric keypad with Num Lock off)
5 DPad center click (numeric keypad with Num Lock off)

Source: http://www.shortcutworld.com/en/win/Android-Emulator.html

How to migrate an old Android Studio project in Gradle

The most common issue that affects users is the runProguard property changing names to minifyEnabled. If you run into the build error

Gradle DSL method not found: ‘runProguard()’

then this is the cause of your build error.

This crops up a lot because that property was inserted into all projects created by Android Studio prior to version 0.14.0.

To update your project, edit your build.gradle file as follows:

    release {
-       runProguard true
+       minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'

Source: http://tools.android.com/tech-docs/new-build-system/migrating-to-1-0-0