locked
[Xamarin]Unable to install Android SDK Tools 28.0.3! RRS feed

  • Question

  • I just updated to Visual Studio 16.1 and it seems this new update is corrupt, at least for Xamarin components.

    Upon opening an Android solution, after a few seconds, a window appears that prompts me to accept agreement for SDK Tools 28.0.3. I click accept and the UAC dialog appears and I click yes. Then VS statusbar shows "Wait for reponse accepting agreement".

    Then, nothing happens except an error shows in error list:

    Severity    Code    Description    Project    File    Line    Suppression State
    Error        The project mytest is missing Android SDKs required for building. Double-click on this message and follow the prompts to install them.             0    

    Double clicking on the message only leads me to an infinite loop through the above steps...

    Help!


    Ignorance is blissful


    • Edited by Neo the 1 Wednesday, May 22, 2019 5:22 AM
    Wednesday, May 22, 2019 5:16 AM

Answers

  • i had the same problem once, try to run the cmd with admin privileges.
    • Marked as answer by Neo the 1 Thursday, May 23, 2019 4:03 PM
    Thursday, May 23, 2019 12:26 PM

All replies

  • Hi Neo,

    Welcome to the MSDN forum and thanks for your feedback.

    According to the error message, it seems missing the required Android SDKs and please have a look at this similar issue, go to Tools -> Options -> Xamarin -> Android Settings and then make sure that the "Auto Install Android SDKs" was ticked and restart the VS to test this issue again.

    Best regards,

    Sara


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Wednesday, May 22, 2019 8:28 AM
  • Hello, i have the exact same Problem on WIndows 7 since updating to 16.1.
    The above suggestion did not work for me.
    Wednesday, May 22, 2019 9:39 AM
  • Hi Neo,

    Welcome to the MSDN forum and thanks for your feedback.

    According to the error message, it seems missing the required Android SDKs and please have a look at this similar issue, go to Tools -> Options -> Xamarin -> Android Settings and then make sure that the "Auto Install Android SDKs" was ticked and restart the VS to test this issue again.

    Best regards,

    Sara


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


    No, that won't work because that option is on by default. And I think that's why we get the Update 28.0.3 dialog automatically.

    Ignorance is blissful

    Wednesday, May 22, 2019 10:57 AM
  • Hi Neo,

    Thanks for your update.

    If you directly create a new Android project, does this issue persists? If so, we can try to report this issue to the VS Product Team through Help-Send Feedback-Report a problem...

    Meanwhile, you can go to Tools-Android-Android SDK Manager and at the bottom if there have update reminder, please try to update it and build this project to test it.

    Best regards,

    Sara


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, May 23, 2019 6:38 AM
  • Hi Neo,

    Thanks for your update.

    If you directly create a new Android project, does this issue persists? If so, we can try to report this issue to the VS Product Team through Help-Send Feedback-Report a problem...

    Meanwhile, you can go to Tools-Android-Android SDK Manager and at the bottom if there have update reminder, please try to update it and build this project to test it.

    Best regards,

    Sara


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


    It's aBLOCKING bug! I just installed VS2019 Community inside a fresh new VM (Windows 10 Pro), the same issue persists both to existing and new Android projects.

    Ignorance is blissful

    Thursday, May 23, 2019 7:33 AM
  • FYI i tested the Visual Studio Preview Version but it's not working there either.

    Meanwhile i found out, that it's working on my Admin Account without having to Accept a License.

    So i guess Visual Studio isn't finding the Android SDK without Admin Priviliges.


    Sad thing is, i'm not allowed to work on my Admin Account so i can't do anything at the moment but wait for a fix.
    • Edited by BlueKuen Thursday, May 23, 2019 8:29 AM
    Thursday, May 23, 2019 8:27 AM
  • FYI i tested the Visual Studio Preview Version but it's not working there either.

    Meanwhile i found out, that it's working on my Admin Account without having to Accept a License.

    So i guess Visual Studio isn't finding the Android SDK without Admin Priviliges.


    Sad thing is, i'm not allowed to work on my Admin Account so i can't do anything at the moment but wait for a fix.

    What do you mean by 'Admin Account'? If I start VS in Admin mode, I won't get the usual UAC dialog, but the status text still shows 'Waiting for License Agreement' and finally the error shows in error list.

    Ignorance is blissful


    • Edited by Neo the 1 Thursday, May 23, 2019 9:33 AM
    Thursday, May 23, 2019 9:32 AM
  • I mean the Windows Admin Account, where all Programs are automatically started in Admin Mode.
    I also didn't get the UAC Dialog and the error didn't show up.
    Thursday, May 23, 2019 9:39 AM
  • Is it possible for me to manually install a specific version of Android SDK?

    VS does provide a SDK Manager, but it only allows me to remove existing components. I wonder how useful this tool is...


    Ignorance is blissful

    Thursday, May 23, 2019 9:44 AM
  • You can use the Command Line Tools within the android-sdk/tools folder to manually download and install sdk tools.

    Another option would be to use the sdk manager within android studio. Thats the way i make it.

    • Proposed as answer by BlueKuen Thursday, May 23, 2019 10:04 AM
    • Unproposed as answer by BlueKuen Thursday, May 23, 2019 10:04 AM
    Thursday, May 23, 2019 9:47 AM
  • I just found out that my JAVA_HOME Path Environment Variable was pointing to the wrong location.

    You need to make sure that your JAVA_HOME Path is pointing to a Java Version > 8 to get the build tools working

    Setting the right Java Version Path did solve the Problem for me! Thank you for pointing me in the right direction!
    • Proposed as answer by BlueKuen Thursday, May 23, 2019 10:06 AM
    • Edited by BlueKuen Thursday, May 23, 2019 10:07 AM
    Thursday, May 23, 2019 10:06 AM
  • You can use the Command Line Tools within the android-sdk/tools folder to manually download and install sdk tools.

    Another option would be to use the sdk manager within android studio. Thats the way i make it.

    I hate this. It seems something very fundamental is broken. I run sdkmanager.bat --update from C:\Program Files (x86)\Android\android-sdk\tools\bin and the update process stops abruptly at 10%.

    Output:

    ... (license text)

    January 16, 2019
    ---------------------------------------
    Accept? (y/N): y
    Warning: Failed to read or create install properties file.
    [===                                    ] 10% Installing Android SDK Platform-To


    Ignorance is blissful


    • Edited by Neo the 1 Thursday, May 23, 2019 10:48 AM
    Thursday, May 23, 2019 10:46 AM
  • i had the same problem once, try to run the cmd with admin privileges.
    • Marked as answer by Neo the 1 Thursday, May 23, 2019 4:03 PM
    Thursday, May 23, 2019 12:26 PM
  • i had the same problem once, try to run the cmd with admin privileges.

    OMG, you are a life saver! Below are the steps I took to update to 28.0.3 (for others' sake):

    0. Open an Admin console.

    1. set JAVA_HOME=C:\Program Files\Android\jdk\microsoft_dist_openjdk_1.8.0.25 2. cd C:\Program Files (x86)\Android\android-sdk\tools\bin 3. sdkmanager.bat --update 4. sdkmanager.bat --install platforms;android-28 5. sdkmanager.bat --install build-tools;28.0.3

    If unsure, type sdkmanager.bat --list > t.txt and open t.txt searching for 28.0.3 to see if there are any components to be installed.

    Ignorance is blissful



    • Edited by Neo the 1 Thursday, May 23, 2019 4:23 PM
    • Proposed as answer by Timmy_GUO Monday, June 3, 2019 12:37 AM
    Thursday, May 23, 2019 4:16 PM
  • Thank you very much. I solved my problem with my method.


    Monday, June 3, 2019 12:38 AM
  • This really work , thanks a lot!
    Sunday, June 9, 2019 1:58 PM
  • I have the same question above. when i open Android project,

    Error:The project *** is missing Android SDKs required for building. Double-click on this message and follow the prompts to install them.

    Warning:Could not find android.jar for API Level 28.This means the Android SDK platform for API Level 28 is not installed. Either install it in the Android SDK Manager (Tools > Open Android SDK Manager...), or change your Xamarin.Android project to target an API version that is installed. 

    Please help me. Thanks

    Tuesday, June 25, 2019 7:12 AM
  • As mentioned below, but with extra details making the solution unclear:

    set the JAVA_HOME environmental variable for your system (Settinjgs -> System -> About -> System Info) to your java home directory.

    I found out that Mine wasn't set at all, although java worked just fine without it.  But when I set it, and restarted Visual Studio, the Xamarin.Android build worked.

    Tuesday, September 10, 2019 2:45 PM
  • Set your JAVA_HOME environmental variable.
    Tuesday, September 10, 2019 2:49 PM