Forum Visual Studio
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Android SDK Manager and AVD will not open! neither will my xaml layouts

am sooooooo sick of this!!! Third time this happens! last two times I finally uninstalled Xamarin and Android SDK Tools and downloaded them again and installed them.
This time something happened when I installed latest updates in android SDK because I needed to install Google play services and figured that might be better... but NO!!!
aI m using Visual Studio integrated with Xamarin, Xamarin.android. I use windows 7 if that is relavant.
I googled this issue but didnt find or understand the various solutions ppl had... changing paths....I think it is a path/directory issue..
Here are the Error messages:
trying to open Xaml.file : "Microsoft Visual Studio - The operation could not be completed."
trying to open Android SDK Manager or AVD: "Microsoft Visual Studio - Command did not execute successfully due to an unexpected exception. Please check the output window for additional information."
the output window is empty, good to know is that i can build the solution.
Pleeeeeease please help! this also happened to my friend....

//Matilda ([email protected])

Answers

  • EmyMa341EmyMa341 USMember ✭✭

    Same problem with and I still didn't found any solution, Please post if you found ant solution while opening adb command prompt

    "Command did not execute successfully due to an unexpected exception xamarin"

  • RashaAshourRashaAshour EGMember

    I am facing the same issue guys on Visual Studio 2015 , Xamarin , Windows 10

    Any help plzzz ?

  • UddhaoPachrneUddhaoPachrne INMember ✭✭
    edited October 2015

    Hello,
    I faced same issue. This error occur because of Android.bat file missing. Go with following path and click on SDK Manager, it showsAndroid.bat file missing error.
    C:\Program Files (x86)\Android\android-sdk
    Just install this file and it will work fine.

    Thank you

  • MarcMagninMarcMagnin FRMember ✭✭

    Sweet !
    How do you install that file ? What do you put in ?

    Cheers

  • MarcMagninMarcMagnin FRMember ✭✭

    Ok this did solve the thing:
    http://stackoverflow.com/questions/24949446/android-bat-file-is-missing-in-sdk-tools-folder-also-i-do-not-having-avd-sdk-m

    "Probably all the contents of the sdk/tools folder are missing as well?
    Best method to solve this issue is to go to the sdk/temp folder. There you will find a zip file with a name like "tools_r24.0.1-windows" (version number will be different)
    Copy it to someplace and extract it. Inside the extracted folder you'll have a folder named 'tools'
    Copy that folder to sdk/ and replace the current tools folder in sdk/
    And voila! SDK and AVD will work again and all your virtual devices will be restored!"

  • Hi guyz!

    I've had the same problem after installing VS2015 Enterprise (with Xamarin). And I've (partially) solved it by manually starting Android SDK manager (by running batch "C:\Program Files (x86)\Android\android-sdk\tools\android.bat" in elevated mode). Once having SDK manager opened it was easy to upgrade existing and download some missing files.

    But after that I've ran into a different problem: when I try to start Android SDK Manager from Visual Studio I get nothing. Actually for a second there is a command window shown in the attached image.

    The message is confusing for a few reasons:

    • I definitely do have Java (otherwise I wouldn't be able to run SDK Manager manually;
    • There is "java.exe" file in "C:\Windows\System32"
    • And "Invalid drive specification"??? There is no more valid drive than "C" :smile:

    Any help would be appreciated!

    Thanks!

  • Aaaarrrrghhhhhh!

    Stupid me... Whenever something is "missing" from System32 - the problem must be related with x86/x64 build targets and System32/SysWOW64 directories... And I have 64bit Java on my machine.

    I've copied java.exe from c:\Windows\System32 to c:\Windows\SysWOW64 - and now "Android SDK Manager" menu item in VS works like a charm.

    Btw. In your experience, can I expect more problems due to the fact that I'm using 64bit Java?

    Sorry for bothering and thanks!

  • charlycharly USMember

    Cheers Marc you saved me !

  • RavindraKumarRavindraKumar USMember ✭✭

    Thanks Aleksandar Pesic !
    It realy works like a charm.

  • BuildCalcBuildCalc USMember ✭✭✭
    edited April 2017

    I've been struggling with this same issue (Tools/Google Emulator Manager and Tools/SDK Manager won't start) with the Mac version of Xamarin Studio. In the Xamarin Studio Preferences/Projects/SDK Locations/Android, I've tried both /usr and /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home for the Java SDK (JDK) value with no luck. This happened when I upgraded from java 1.7 to 1.8 to address Android compile issues. Any suggestions?

    I should note that switching Java SDK (JDK) setting (referenced, above) to /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home does not work as well.

  • OlafBOlafB USMember ✭✭
    edited April 2017

    I had this as well a couple of times. You need to completely reinstall the Java SDK.

    Main problem was that it deleted the 'Tools' directory in the SDK for some reason.

  • JamesConteJamesConte USMember

    You can get the latest component SDK tools from:
    https://androidsdkoffline.blogspot.com/p/android-sdk-tools.html

    This way you don't need to completely reinstall Android Studio.
    In my case, and I suspect others, the file C:\Users\me\AppData\Local\Android\android-sdk\temp\tools_r25.2.5-windows.zip was actually corrupt.

  • RolandHuhnRolandHuhn USMember ✭✭

    @BuildCalc , Any luck with your problem?
    I am facing the same on my Mac since yesterday.

  • RolandHuhnRolandHuhn USMember ✭✭

    Thank you, @BuildCalc. I ended up dropping back to Android SDK 25.2.5 by downloading it and copying it manually.
    That fixed my issue of opening the AVD manager and SDK Manager.
    However I can't seem to get the debugger working on android from Visual Studio from Mac, so it might be a partial fix...
    Thanks anyway, I keep digging

  • balajisbalajis USMember

    go to system 32 copy java there and paste it in syswow64 now everything will work perfectly

  • mmooonmmooon Member

    @AleksandarPesic said:
    Aaaarrrrghhhhhh!

    Stupid me... Whenever something is "missing" from System32 - the problem must be related with x86/x64 build targets and System32/SysWOW64 directories... And I have 64bit Java on my machine.

    I've copied java.exe from c:\Windows\System32 to c:\Windows\SysWOW64 - and now "Android SDK Manager" menu item in VS works like a charm.

    Btw. In your experience, can I expect more problems due to the fact that I'm using 64bit Java?

    Sorry for bothering and thanks!

    thanks alotttttttttttttttttttttttttttttttt
    this was the solution

  • mmooonmmooon Member

    THANKS GOD
    MARC SOLUTION WAS THE SOLUTION

Sign In or Register to comment.