How to I emulate a specific Android device via AVD? - android

(This question may belong on a different site such as SuperUser. If so, please migrate!)
I'm trying to do a lot of debugging of our web app for Android. The Android emulator seems a tad more difficult for me to get running than the iOS ones. ;)
I have installed the proper Java JDK and Android SDK.
I can now launch AVD manager. This is where I'm stuck. I understand this is where we can customize the specifications of our particular device, but to create a new virtual device, I need to choose a target. However, my target menu is grayed out. I'm guessing there's one more thing I need to install, but I'm lost as to what that is. (BTW, for starters, I'm trying to emulate the Thunderbolt).

Check this out. You probably missed step 4
Installing the SDK

Installing the Android SDK does not install one of the Android platforms to build a AVD from.
To install a platform do the following:
Open the Android SDK Manager (located in the Android SDK directory as tools\android).
Select at least one Android platform to install, and click Install Selected. Depending on the version of Android running on the Thunderbolt, you would most likely choose to install Android 2.2 or Android 2.3).
Once this installed the target menu will display the version you installed.

Related

android studio times out installing the app

I have a question about running an app through the emulator on android studio.
My emulator device is able to turn on, but when running the app, install never completes so the app times out. I have tried invalidating cache and restarting, and I have installed the sdk platforms that are the same as the emulators and project, but these changes did not work. My computer cannot install emulator hypervisor driver for AMD processors or intel x86 Emulator accelerator, but I don't think it is necessary for the app to run since my emulator can turn on, right? also, any app has never successfully run on android studio.
The is no code other than the hello world that comes up automatically. This is an empty project with a minimum sdk of api: android 4.1. The device I am using is a pixel 2 with an api of 22. (size on disk 3.5 GB) for tools, I have android SDK build-tools 33, android emulator (31.3.10), and android sdk platform- tools (33.0.3) installed.
I have tried every forum that has the same issue as me but if you think there is one that can help me, please share it thanks.
Android Emulators aren't always the best so expect random failures. This is what I would try:
Make sure the app compiles properly (make sure you see BUILD SUCCESSFUL in your bottom "Build" Tab in Android Studio)
Make sure you have updated Android Studio and Android Emulator, Android Build Tools, SDKs etc.
Create and use a device with a higher API version. Ideally one with Play Store.
Depending on your development machine you might want to try a different architecture (ABI). Try x86 or x86_64 instead of what you've already tried.
In rare cases your existing emulator images get corrupted. Uninstall them in your SDK manager (Show Package Details) and install them again.
If possible try running the app on a real device (follow online instructions to enable USB debugging etc.) to verify the emulator is the problem.

Android Studio 2.3 AVD Manager Greyed out?

I just recently installed Android Studio (Version 2.3) so I could use the SDK / AVD GUI manager built in now that the standalone is deprecated. I'm on Windows 10 and this is a fresh install. My goal is to be able to setup a virtual device as well as setup my own android device to run a NativeScript app. After install the SDK button is available, but the AVD button is disabled (below).
I have the Android 7.1.1 (Nougat) SDK Platform installed and the Intel x86 Emulator Acc. installed (below). This is all default installs so far.
I've tried installing / reinstalling as admin as well as opening as admin per this post to no avail.
The Android SDK home path, build target, and Java SDK are setup in the project structure by default correctly as well.
Any thoughts on what I'm missing here?
As a side note the android help page for creating AVD's lists a menu option (tools -> android ) which doesn't exist.
My issue was Android Studio does not understand where to load the nativescript android project even after adding android as a platform (If someone knows a way around this, feel free to post). In my particular case I'm testing the angular-seed-advanced. To at least get the command line working (AVD manager is still greyed out):
Create a new blank android "test" project in android studio
The AVD Manager becomes available
Setup an virtual devices as necessary
Reopen nativescript project
use command npm run start.android
prepare, build, run and livesync will work as expected now.
Hope this helps someone else get started.

Cannot run AVD emulator in Android Studio, missing file

I have a quite big problem as accidentally removed the file, it is already removed from the bin on Mac. Now in Android Studio I cannot run emulator and I get the below message:
Can anyone help me please? What should I do now? Is there any way I can reinstall this missing file for Android studio?
Many thanks in advance!
EDIT: My problem was a missing .exe file: qemu-system-i386. I couldn't find any working solution, tried installing various images versions, was creating new emulators. I decided to uninstall Android Studio and proceed with the new installation. I used a free tool, AppCleaner, to remove the Android Studio, you can read more about this here: http://lifehacker.com/5828738/the-best-app-uninstaller-for-mac. But still had to remove manually the entire sdk tools directory. You can actually do the same from the terminal, here is the thread how to do it: How to completely uninstall Android Studio?
Anyway, the important thing it is working now! :D
1) Open the SDK manager (see the image below):
[
2) Launch the stand alone SDK manager
3) Ensure that you have downloaded and installed the SDKs and tools for Android version that you'd like to emulate. In my case I use API 25. You should also have the Intel x86 Intel Atom System images installed.
4) Then open the AVD Manager and "Create a Virtual Device"
5) Select the API level that corresponds to the one you installed in the previous steps. In the newer versions of Android Studio you can also download and install the System Image you desire in this menu.

How does Ionic decide which Android emulator to launch?

I am following this for Android platform: http://ionicframework.com/getting-started/ (cmd> ionic emulate android) . It builds ok, and I know the apk works on a phone, but I want to figure out how does it decided which Android Virtual Device to launch. At the moment, it start up a v2.2 emulator by default and then complains it's too old while trying to install the apk. I want to use v4.1 or higher (I have the relevant SDKs installed through previous native Android development using Eclipse.)
From the command line, just specify the emulator target.
e.g. ionic emulate android --target="Nexus_6P_API_25"
Check the AVD manager for a list of available and installed virtual devices.
Kind of found an answer myself. Instead of using Google Android emulator, one can use
Genymotion. And use can set the device screen size and Android version.

qt for android doesn't find my physical device

I'm trying to write android applications with Qt5.1. I installed everything according to these instructions and I wrote my application and built it successfully. My problem is that when I click run on android version, instead of running the application on the device that I have connected or even asking whether I want to use the virtual device or physical device ( like eclipse does ) it just opens ADV.
I know I have connected my device properly because I can run applications I write with eclipse on my device. But not with Qt.
Can anybody help me?
Just in case you need to know I'm using the latest version of ndk and for sdk I'm using the one that comes with adt's latest version. If any other information I should provide please let me know.
thank you
I have had this problem as well, your device is not corresponding with the QT run settings. When you press run (probably in QT Creator?) it will search for devices which allow the application to run on.
There are a few possibilities when it comes to this:
Your device is not set up correctly:
run "adb start-server" and then "adb devices" in your command prompt. Does it say it found 1 device with status: "device"? If not your device probably doesn't have USB debugging enabled (you can enable this in the dev settings on your device).
You are building in the wrong mode:
Make sure you are creating a program for ARM (ARM GCC 4.7 QT 5.1 for example).
Deploying for the wrong API level:
Are you running the program on a device that supports API level 17 ? If not you can change these settings (API Level) in your QT project settings.
You don't have the recent API level installed:
Start the android sdk manager and download + install the new API's.
It worked for me after performing these steps, should you have any other difficulties feel free to ask!
Edit
If these steps did not work check if your android sdk is located in a location with write permission.

Categories

Resources