Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command did not execute successfully due to an unexpected exception. Please check output window for additional information

Tags:

android

when i click on AVD, a prompt will appear with "Command did not execute successfully due to an unexpected exception. Please check output window for additional information" when i see the output window a failure message will appear:- below is the error log

[failure] could not find file 'c\Users\braintech\AppData\Local\Temp\.NETPortable,Version=v4.0,Profile=Profile158.AssemblyAttributes.cs'.
[failure] could not find file 'c\Users\braitech\AppData\Local\Temp\Xamarin.ios,Version=v1.0,AssemblyAttributes.cs'.
[failure] could not find file 'c\Users\braitech\AppData\Local\Temp\MonoAndroid,Version=v5.0,AssemblyAttributes.cs'.
like image 616
ankit chauhan Avatar asked Sep 27 '22 05:09

ankit chauhan


2 Answers

I came across the same problem as you when I was working with Xamarin in visual studios. Every time I clicked on the android sdk manager I would get this error. There are a few solutions that I found for this problem. However Only one of them actually worked for me:

Possible solution: Go to where the sdk folder is installed. Mine is installed at C:\Program Files (x86)\Android\android-sdk. Once you're there, go into the tempfolder. Grab the zip file named "tools_r24.0.1-windows" (version number might be different). extract it somewhere, copy the the "tools" folder that it creates and paste it in the sdk file location, C:\Program Files (x86)\Android\android-sdk. Replace the old one. Restart VS and it should work.

This information was provided by MarcMagnin, https://forums.xamarin.com/discussion/43688/android-sdk-manager-and-avd-will-not-open-neither-will-my-xaml-layouts

like image 70
A.sharif Avatar answered Oct 12 '22 22:10

A.sharif


I think I came across this problem because I had rolled back the latest android platform and build tools when they broke my build. It seems to have deleted the Android tools altogether, rather than rolling them back.

So, I checked in my android-sdk folder, and sure enough, the tools subfolder was missing.

From various installs at various different times, I have an sdk folder next to the android-sdk folder at C:\Users\me\AppData\Local\Android\sdk, and this sdk folder still contained tools. So I just copied sdk\tools and all its contents into the neighbouring android-sdk folder, and the problem was solved.

like image 36
user1725145 Avatar answered Oct 12 '22 23:10

user1725145