Android Emulator cannot be found VS2019 - android

I am attempting to play around a little with xamarin within Visual Studio 2019. I built a new Xamarin Android application and just want to run the base code in the emulator, but I am getting the error in the image below. When I installed VS2019, I did so with the xamarin features including the SDK on my secondary drive and I can see the sdk file on my secondary drive, but am fairly sure that VS2019 is looking with my primary drive for some reason. Is there a way to fix this?

I don't bother with the SDK or emulator packages through the visual studio installer anymore. Install Android Studio, use the tools in that to download the SDK and setup the devices you want to emulate. Then back in Visual Studio, set the paths in the Xamarin/Android Settings in the options menu. Mine look something like this:
Android SDK Location: C:\Users\myusername\AppData\Local\Android\Sdk
Android NDK Location: C:\Users\myusername\AppData\Local\Android\Sdk\ndk-bundle
This setup seems to have much support for Android and gives you the various Google apps and services in the emulators.

Fist, you should check your android sdk path by Tools > Options > Xamarin > Android Settings to view and set the Android SDK location:
For more details, you can check here.
Meanwhile, you should check the Android SDKs and Tools by steps: Tools-> Android->
Android SDK Manager...,then you need install the platforms and Tools you need.E.g.

It seems a little bit late, but I faced this issue and I did the following to sort it out:
Be sure that the BIOS virtualization is enabled
Run the VS2019 as an administrator and run the Android device manager
Wait a for seconds it takes some times
After getting the screen of the Android device manager press the (+) plus button
If you get the menu titled New Device then cancel the creation of a new device
close VS2019 and log out the administrator account
Log in again with your account and run the Android device manager
Hope this may help

Related

Delphi 10.4: How to start writing Android apps?

Until now I have only programmed for Windows, but I would like to try Android.
So, I installed Delphi 10.4 CE with all the options.
Then, I installed all the recommended stuff with SDK Manager.
Then, I connected my (Huawei) phone to my (Windows 10) laptop with USB, and found out how to activate the developer mode and remote debugging.
Then, I created a blank multi device application.
But still, Delphi refuses to even show the "Android" option! (I can only select "Windows 32 bit")
What am I missing? I'm getting desperate after so many hours of searching!
There is no Android option in the Delphi IDE:
Seems like your issue is that Android hasn't been added as a platform option within your project.
First, you'll need to make sure that you have the Android platform installed. You can do this by going to "Tools" and then "Manage Platforms..." from the main menu:
Once you have the Android Platform installed in your IDE, then within your project, you can add it as a platform option by right-clicking on the "Target Platforms" option in your Projects window, then selecting "Add Platform...":
Within that menu, you'll be able to select Android as an option as can be seen in the screenshot below:
Once you have Android added as a platform option, then you should see your phone under "Target":
If you're not sure where to find your Projects window, see below:

Android Studio SDK installation issue after update

I bought a course at Udemy, but the version that the instructor uses is older than mine. Thus, I couldn't finish my installation successfully. In the version that he used, there were 3 boxes to check on the first opening. Android Studio, SDK, and virtual device. He checked all of them. But mine doesn't have SDK box at all.
I am totally new to the Android studio and using windows 10. How should I install the sdk?
Install Android Studio, and if you want to configure SDK settings or whatever that is related to SDK, go to Tools -> SDK Manager
If you want to configure virtual devices go to Tools -> AVD Manager.
see the Android Studio intro, which explains how to use the SDK manager.
it's toolbar icon had been changed recently, which may lead to confusion.
use x86 emulator images for best performance, when HAXM is supported.

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.

Issues after installing Xamarin

I got a new laptop this week (Win10), installed Visual Studio 2015 community, followed by Xamarin. I've created a blank Android project, uncommented the SetContentView(...) line in MainActivity.cs, then build the solution. However I'm running into various problems when I try to run it:
The list of emulators (next to the green "run" button) only contains two entries: "Android_accelarated_x86 (Android 6.0 - API 23)" and "Android_ARMv7a (Android 6.0 - API 23)". Is this normal? The Xamarin doc'n seems to suggest that a number of "Xamarin xxx" emulators would be installed.
When I run the project against "Android_accelarated_x86", the emulator starts up, Visual Studio reports the deployment is successful, but Visual Studio stops debugging. In the output window I see this:
InspectorDebugSession(0): StateChange: Start -> EntryPointBreakpointRegistered
InspectorDebugSession(0): Constructed
Android application is debugging.
Couldn't connect to logcat, GetProcessId returned: 0
InspectorDebugSession(0): HandleTargetEvent: TargetExited
InspectorDebugSession(0): Disposed
If I hit run again, the app seems to start on the emulator, but then a message appears saying "Unfortunately xxx has stopped" (where xxx is my project name). The above messages appear in the VS windows again (apart from the one about 'Couldn't connect to logcat...').
I've also noticed that the "Manage Virtual Devices" item in the dropdown is greyed out, so I presumably can't try creating a different emulator?
Shooting from the hip on this one but do you have the Android SDK installed? It should install a number of other emulators and give you access to the device manager.
There are emulators you can INstal with Visual Studio. Emulators that come with the Android SDK and emulators that install with Xamarin Studio.
One additional thing to try would be to install Xamarin Studios. It does a slightly better job in my experience of setting up your environment then VS Does.
Firstly, the Manage Virtual Devices is referring to Xamarin Android Player VMs (which is now deprecated). We're working on getting this removed if Xamarin Android Player isn't present.
To create / edit / fix your Google AVD VMs you should select Android Emulator Manager. Regarding the number of devices listed, I'd probably ensure everything Xamarin is updated..
Visual Studio > Tools > Options > Xamarin > Other > Check for Updates
..and also update all your SDK components. If you have an Intel CPU you should use the x86 images for best performance. If you haven't already installed this you can get it here:
https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager
If you update any images it could be that your AVD needs repairing, which you can do in the Android Emulator Manager by selecting the relevant image and clicking Repair.
Also, you will only be able to deploy to devices that your project is targeting, so it's worthwhile checking the AndroidManifest.xml or by right-clicking your project and checking the 'minimum' and 'target' Android API levels to ensure you're encompassing the AVDs you have created.

Trying to emulate android from Appcelerator on Windows

I installed Appcelerator on Windows, am trying to see android output.
I managed to add an android device by downloading - launching an android emulator called Genymotion. Now I have an IP address added to the Run menu, when I activate it Appcelerator tries to launch: console messages appear. But after 1minute or so I get a message saying I should download an SDK API level 23.
I had an old version of Android Studio, I updated it, opened its SDK manager tool and downloaded everything I could find, rebooted, but error persists. I can see Android version 23 in the list.
Here is the error message:
[ERROR] : No valid Android SDK targets found.
[ERROR] : Please download an Android SDK target API level 23 or newer from the Android SDK Manager and try again
I had the same issue recently and it turned out to be the java JDK missing from my path.
Take a close look at the Appcelerator environment variable documentation for windows.
Below are some java directories included in my path on my new Windows 10 machine:
C:\ProgramData\Oracle\Java\java;
C:\android-sdk-win\tools;
C:\android-sdk-win\platform-tools;
C:\Program Files (x86)\Java\jdk1.8.0_65\bin;
Also, I really suggest using GenyMotion (which I avoided for years) to run your emulators, turns out to be incredibly fast, easy to setup and they have free Basic Version.
Best of luck.
Now I have an IP address added to the Run menu
Studio should detect Android & Genymotion emulators and allow you to select from a list. No need to enter the IP. If you don't see the emulators, run appc ti info -t android to see if there's any issues that need fixing.

Categories

Resources