Visual Studio 2017 - SDK and AVD wont open - android

So i have installed Visual Studio 2017 Community version for my windows 7 laptop. The installation completed with an error log that said that it had failed to download the Android Emulator for it.
Now, when i try to click on The AVD Manager or the SDK - both do nothing at all (no feedback too).
When i try to do a repair or modify - VS will tell "Setup Operation Failed".
I have search online for the Android Emulator only package - but all found were compatible with windows 8 or more.
I have looked online, and some people still have this problem - but no solution.
I would appreciate any help.
Thanks!
Error log bit:
The product failed to install the listed workloads and components due to one or more package failures.
Incomplete workloads
Mobile development with .NET (Microsoft.VisualStudio.Workload.NetCrossPlat,version=15.0.26403.0)
Incomplete components
Android NDK (R13B) (Component.Android.NDK.R13B,version=13.1.6)
Android SDK setup (API level 23) (Component.Android.SDK23,version=15.0.26208.0)
Google Android Emulator (API Level 23) (Component.Google.Android.Emulator.API23.V2,version=15.0.26208.0)
Intel Hardware Accelerated Execution Manager (HAXM) (Component.HAXM,version=15.0.26208.0)

Google recently released Android SDK Tools 26.0.1(March 2017) that comes with the Android Studio 2.3.1(April 2017) update. This version of Android SDK Tools deprecates the android program in the tools folder.
Because of this deprecation, the SDK Manager and AVD Manager stand-alone programs will no longer work when invoking them from the respective IDE menus. Rather Google has recommended that users now use the CLI tooling.
LINK

Related

Can't install vsix to Visual Studio 2019 - Android Device Manager has a lower version than required by Visual Studio

I have Visual Studio 2019 installed with Xamarin. I'm trying to get Shell to show up in the project templates. I'm following this post as a guide. But when I install the vsix file, it fails with the error message: Installation of Microsoft.VisualStudio.Android.DeviceManager failed. The extension has a lower version than required by Visual Studio. Please install the extension from Visual Studio Installer instead.
Where in the Visual Studio Installer is the Android Device Manager? I've installed all the Mobile Development tools and all updates....
That post is obsolete - it describes something you needed to do in a Preview version of VS 2019.
In VS Installer, select Workload "Mobile development with .NET".
I was unable to find any Microsoft doc that tells you to simply do that!
I don't recall whether you still need to also do this step:
Setting up the Android SDK for Xamarin.Android.
After installing the Workload mentioned above, restart VS. See if the menu item mentioned below is there. If so, try to make a sample app - maybe this "Android SDK" step is no longer needed - the Workload might set everything up.
Then Android Device Manager will be at menu Tools / Android / Android Device Manager.
Menu location documented here.

Xamarin; Android 11.0 SDK is not available in Visual Studio; Target Framework

In a computer, I have installed Android 11.0 SDK for a Visual Studio 2019 Community installation and my Xamarin Android app is compiled correctly using this SDK. The SDK was installed automatically:
Then I installed Visual Studio 2019 Community in another computer to compile my app there. But it seems the Android 11.0 SDK is no longer available:
It is not installed automatically and I cannot find anywhere to install it manually. What's wrong and how can I install Android 11.0 SDK on Visual Studio?
After long searching and none of the solutions were working for me, i've found that the SDK can also be installed with the VS Installer.
The API level 30 (Android 11) was nowhere to be found to install, nor VS SDK Manager nor Android Studio SDK Manager (the AS SDK Manager didn't even work, could not load any SDK's)
(See screenshots)
Go to VS Installer -> Modify VS version
-> Go to tab 'Individual Components' -> Search for SDK API level 30 -> Select and install
After the first login you'll probably need to accept SDK licenses again as I had to.
Hope this helps anyone who, like me, did not find any other solution working
PS: I did update VS to its latest version before doing this, not sure if this is mandatory or not since I was on 16.10 before but if this doesn't work, try updating VS itself first.
As of now Android 11 is not officially supported in Visual Studio.
So you have two options:
Select to use unofficial repositories in that dialog
Wait for the version 16.9 where it is supposed to be supported.

Intellij 2020.3 Apple Silicon install Android SDK failure

I'm trying to install the Android SDK using the Intellij Community edition (2020.3) on my mac running Apple Silicon. I have downloaded the newly released Intellij for ARM and is trying to install the SDK using the Intellij SDK setup (launched when creating a new Android project).
However, when trying to install the SDK I get the following error message (see screenshot):
An error occurred while trying to compute required packages.
In the terminal I see two exceptions:
2021-01-06 09:52:35,395 [ 562239] WARN - util.EmbeddedDistributionPaths - Failed to find a valid embedded JDK
java.lang.Error: Incomplete or corrupted installation - "/Applications/prebuilts/studio/jdk/jdk11/mac/Contents/Home" directory does not exist
followed by
2021-01-06 09:53:07,896 [ 594740] WARN - precated.InstallComponentsPath - Dependant package with key emulator not found!
com.android.tools.idea.sdk.wizard.SdkQuickfixUtils$PackageResolutionException: Dependant package with key emulator not found!
If I try to install the Android SDK manually, I simply get the second error message as well when I try to install the build-tools: Dependant package with key emulator not found!.
I know that the emulator does not exist for Apple Silicon, but I should still be able to install the build-tools and debug using a physical device, right?
It happens in IntelliJ IDEA Ultimate too.
I have installed the Android SDK with Android Studio; but, IntelliJ is not able to launch android applications in physical devices.
I suppose Android support in current version of IntelliJ IDEA Community does not yet have any Apple Silicon support.
Here is an Android Studio article about the initial support for Emulator for Apple Silicon: Android Emulator Apple Silicon Preview. The article contains the link to an image and instructions to install.

Why am I getting: "No system images installed for this target"

I'm having trouble with the Android emulator.
I am running on Windows 10, and here is my environment:
Microsoft Visual Studio Professional 2017
Version 15.5.6
VisualStudio.15.Release/15.5.6+27130.2027
Microsoft .NET Framework
Version 4.7.02556
Xamarin 4.8.0.760 (fc93f3f5b)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 4.8.188 (c5813fa34)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin.Android SDK 8.1.5.0 (HEAD/75f8c6838)
Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 11.6.1.4 (db807ec)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
My Android SDK Platform looks like:
and the SDK Tools is:
In my emulator screen, no matter what device I choose, I get the error:
"No system images installed for this target".
I clearly have installed the Google ARM System Images.
I don't understand why I'm getting the error message.
Any help will be greatly appreciated.
Charles
Update 2
I would like to thank York Shen, and Jon Douglas for their help. The Device Emulator now works... well almost.
I installed the Intel HAXM Emulator Accelerator. My console script was:
I also selected the Accelerator from the SDK Tools:
When I try to define a new device using the Emulator Manager, I now get:
Obviously, I still have a problem with HAXM. By the way, if you tell me I have to change my computer's BIOS to make HAXM work, I will give up on Android.
I tried to run a default emulator, and it warned me that I could continue, but without any acceleration. A simulator appeared but my application did not run. My application only runs on iOS and UWP.
I'm going on five days in trying to get the Android Emulators to work. No cigar. I contrast this to my experience with the iOS Emulator. That one took me about 1/2 an hour to get running. It was very clean and simple. I'm thinking seriously about abandoning all software development for Android.
Why am I getting: “No system images installed for this target”
As #Jon Douglas said, you are using a deprecated version of the AVD Manager, you could refer to the docuemnt:
As of Android SDK Tools version 26.0.1, Google has removed support for their UI-based AVD and SDK managers in favor of their new CLI (Command Line Interface) tools.
You could refer to my answer for a more detailed answer about how to solve this issue:
Xamarin with Visual Studio not detecting CPU/ABI system image for emulator, even though system images are installed
Update:
If you use the Xamarin SDK Manager and Xamarin Android Device Manager, you need update to Android SDK Tools 26.0.1 and later (which is required for Android 8.0 Oreo development).
You could read this: Requirements. In your situation, upgrade your Android SDK Tools version to 26.1.1:
Update 2:
You need Installing the Xamarin Android Device Manager, then you could start the Device Manager by clicking Tools > Android Emulator Manager:
To help anyone scratching their heads as to why when they install a new version of Visual Studio 2017 the emulator looks different to York Shen above, its because Visual Studio didn't bundle the latest version of the AVD Manager into Visual Studio 15.6.6 (as of 23rd April)
I followed #York Shen - MSFT's answer until I hit a snag on the update of the Android SDK tools. I simply downloaded them from https://developer.android.com/studio/#downloads (Command line tools only, sdk-tools-windows-4333796.zip).
Copy the contents of the tools folder into C:\Program Files (x86)\Android\android-sdk\tools

Visual Studio not showing installed Android api levels

I am developing an Android app in Visual Studio. In the Android SDK manager, all API's from API level 23 (Android 6.0) to API level 25 (Android 7.1) are installed.
But when I open the project properties in Visual Studio, the "Compile using Android version" option is showing apis only till 23(Android 6.0). I want to target 7.1 as most of the smartphones will now have it.
There are another problem if I go with Android 6.0. Some packages like Xamarin.Firebase.Messaging fails to install with the following error.
Install-Package: Could not install package 'Xamarin.Firebase.Messaging 42.1001.0'.
You are trying to install this package into a
project that targets 'MonoAndroid,Version=v6.0', but the package does not contain
any assembly references or content files that are
compatible with that framework. For more information, contact the package author.
I can see that all options available under API level 25 are installed in SDK manager. Kindly help me so that i can target Android 7.1 from the Visual Studio Android app. Thanks
Is your Xamarin installation up to date? I suspect that your version of Xamarin.Android is 6.x which means that you won't be able to target Android 7.0 or 7.1 even if they are installed through the SDK manager. You can check the version from Help > About Microsoft Visual Studio.
For example, my version is 7.1.0.19 and I'm able to target Androd 7.1 just fine.
To check for updates, you should open Tools > Options > Xamarin > Other and click Check now.
Update for Visual Studio 2017:
If you're using Visual Studio 2017 or newer, Xamarin updates are delivered as part of Visual Studio updates. To manually check for updates, go to Tools > Extensions and Updates... In the left hand menu, open Updates and select Product Updates. If there are updates available, they will be shown on this list.
In Visual Studio 2017 preview there is an improved Google Android emulation support with a new Android emulator that's built into Visual Studio (this supercedes the Visual Studio Emulator for Android):
I checked it this morning and it had Android emulators up to API 27 including Oreo.
However, I did try to trigger API 28 P-Type even switching the SDK Manager from the Microsoft repository to the Google repository but it still didn't show up, but, at least you got everything you need up to API 27.
References:
https://www.visualstudio.com/vs/preview/
https://blog.xamarin.com/3-reasons-to-try-visual-studio-2017-version-15-4-previews/

Categories

Resources