Taking screenshot on Emulator from Android Studio

Starting with Android Studio 2.0 you can do it with the new emulator: Just click 3 “Take Screenshot”. Standard location is the desktop. Or Select “More” Under “Settings”, specify the location for your screenshot Take your screenshot UPDATE 22/07/2020 If you use the emulator inside Android Studio which is possible since Android Studio 4.1 click … Read more

Making the Android emulator run faster

Official web page ~50% faster Windows: Install “Intel x86 Emulator Accelerator (HAXM)” => SDK-Manager/Extras Install “Intel x86 Atom System Images” => SDK-Manager/Android 2.3.3 Go to the Android SDK root folder and navigate to extras\intel\Hardware_Accelerated_Execution_Manager. Execute file IntelHaxm.exe to install. (in Android Studio you can navigate to: Settings -> Android SDK -> SDK Tools -> Intel … Read more

Accessing localhost:port from Android emulator

You can access your host machine with the IP address “10.0.2.2“. This has been designed in this way by the Android team. So your webserver can perfectly run at localhost and from your Android app you can access it via “http://10.0.2.2:<hostport>“. If your emulator must access the internet through a proxy server, you can configure … Read more

Error “The connection to adb is down, and a severe error has occurred.”

Try the below steps: Close Eclipse if running Go to the Android SDK platform-tools directory in the command prompt Type adb kill-server (Eclipse should be closed before issuing these commands) Then type adb start-server No error message is thrown while starting the ADB server, then ADB is started successfully. Now you can start Eclipse again. … Read more

How can you get the build/version number of your Android application?

If you’re using the Gradle plugin/Android Studio, as of version 0.7.0, version code and version name are available statically in BuildConfig. Make sure you import your app’s package, and not another BuildConfig: import com.yourpackage.BuildConfig; … int versionCode = BuildConfig.VERSION_CODE; String versionName = BuildConfig.VERSION_NAME; No Context object needed! Also make sure to specify them in your … Read more