android-emulator
How do you install an APK file in the Android emulator?
You can simply drag and drop the .apk file of your application to the emulator and it will automatically start installing. Another option: Windows: Execute the emulator (SDK Manager.exe->Tools->Manage AVDs…->New then Start) Start the console (Windows XP), Run -> type cmd, and move to the platform-tools folder of SDK directory. Paste the APK file in … Read more
How to access data/data folder in Android device?
Accessing the files directly on your phone is difficult, but you may be able to copy them to your computer where you can do anything you want with it. Without rooting you have 2 options: If the application is debuggable you can use the run-as command in adb shell adb shell run-as com.your.packagename cp /data/data/com.your.packagename/ … Read more
Running Google Maps v2 on the Android emulator
At the moment, referencing the Google Android Map API v2 you can’t run Google Maps v2 on the Android emulator; you must use a device for your tests.
How to start a Service when .apk is Installed for the first time
Fortunately, Plan B does not work on Android 3.1+, as tested on a XOOM and a Galaxy Nexus. What Plan B does is exploit a security hole that could be used by drive-by malware, which is specifically why Android prevents it from happening anymore. UPDATE To clarify: As inazaruk posted and I put into comments … 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
How do you connect localhost in the Android emulator? [duplicate]
Use 10.0.2.2 to access your actual machine. As you’ve learned, when you use the emulator, localhost (127.0.0.1) refers to the device’s own loopback service, not the one on your machine as you may expect. You can use 10.0.2.2 to access your actual machine, it is an alias set up to help in development.
‘App not Installed’ Error on Android
Primarily for older phones I only encountered the App not installed error when trying to install an apk on my phone which runs on 4.4.2 aka KitKat, but my friend did not encounter this error on his phone which runs on 6+. I tried the other solutions such as removing the old/debug version of the … Read more
How to connect android emulator to the internet
I think some of the answers may have addressed this, however obliquely, but here’s what worked for me. Assuming your problem is occurring when you’re on a wireless network and you have a LAN card installed, the issue is that the emulator tries to obtain its DNS settings from that LAN card. Not a problem … Read more
How to install Google Play Services in a Genymotion VM (with no drag and drop support)?
As of Genymotion 2.10.0 and onwards, GApps can be installed from the emulator toolbar. Please refer to answer by @MichaelStoddart. Next follows former answer kept here for historic reason: Genymotion doesn’t provide Google Apps. To install Google Apps: Upgrade Genymotion and VirtualBox to the latest version. Download two zip files: – ARM Translation Installer v1.1 … Read more