Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice
  4. Join us on Thursday, September 29, for a day with Unity's SRP teams here on the forum or on Reddit, and discuss topics around URP, HDRP, and the Scriptable Render Pipeline in general.
    Dismiss Notice

failed to delete old unity android support

Discussion in 'Editor & General Support' started by WhiteWomanInTrouble, May 13, 2019.

  1. WhiteWomanInTrouble

    WhiteWomanInTrouble

    Joined:
    May 13, 2019
    Posts:
    7
    Hi, i recently installed unity hub and unity 2019 (i was having 2018.3.5.f1). When i was installing unity 2019 , the android support download failed. Then, i dowloaded UnitySetup-Android-Support-for-Editor-2019.1.0f2.
    It says failed to delete old android support, i do not have any unity tools opened, all are closed.
    I clicked on ignore, completed the installation. But why i got this error? i do not want to get errors later.
     

    Attached Files:

    Last edited: May 13, 2019
    Psyboyo and Jeshira like this.
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,329
    Did you reboot first? It sounds like a process has files locked open, a reboot might clear it.
     
  3. Psyboyo

    Psyboyo

    Joined:
    May 16, 2017
    Posts:
    4
    1. Restart the PC

    2. Go to:
    C:\Program Files\Unity\Hub\Editor\2019.2.6f1\Editor\Data\PlaybackEngines\

    (this example is for 2019.2.6f1 but you can choose any other)

    3. You will find there a folder "AndroidPlayer". Delete that AndroidPlayer folder.

    You will need to be a User with Admin rights, and this is probably why Unity fails on uninstall, it has no permission to delete the folder.


    4. Go to:
    https://unity3d.com/unity/whats-new/2019.2.6
    (this example is for 2019.2.6f1, on the right side of the page, choose your version)

    Or if using BETA version go to:
    https://unity3d.com/unity/beta/2019.3#downloads

    Future releases, just adapt the link or Google it.

    5. On the left side of that page under Component Installers Windows (or macOS), choose Android Target Support.

    6.
    It will download UnitySetup-Android-Support-for-Editor-2019.2.6f1.exe in this example, so run that to install. Done!

    I had the same problem now that I reseted my PC, and reinstalled the whole system new, this started to happen in Unity, 2019.2.xxx and 2019.3.xxx. At this point, I can only assume that this happens on a fresh system installation, and that could be why there aren't many answers about this on the net, or even Unity team not finding it out after all this time and fix it.

    Cheers!
     
    Last edited: Sep 29, 2019
  4. FcsVorfeed

    FcsVorfeed

    Joined:
    Aug 15, 2014
    Posts:
    41
    because the field name too long(if you try to delete the floder)
    and 2019.2f18 100% happened

    And I very sure the QA 100% already close the bug even they never fixed it
     
  5. RafaRamirez

    RafaRamirez

    Joined:
    Nov 6, 2019
    Posts:
    2
    Thanks...

    I had Unity 2018.3.14f1 (64-bit) and I was trying to install Unity 2019.2.21f1 (64-bit) ... the same issue;
    Psyboyo your fix works.
     
  6. Forty4Minutes

    Forty4Minutes

    Joined:
    May 18, 2020
    Posts:
    1
    Man this info saved me a lot... thank you :)
     
  7. Seyed_Morteza_Kamaly

    Seyed_Morteza_Kamaly

    Joined:
    Nov 18, 2015
    Posts:
    80
    I have same problem
    I uninstall all version of unity in my computer
    but I couldn't fix it

    download and install UnitySetup-Android-Support manually isn't good solution because you can't use Unity recommended SDK And JDK to export your game
     
    Last edited: Jun 29, 2020
  8. ShawnFeatherly

    ShawnFeatherly

    Joined:
    Feb 22, 2013
    Posts:
    54
    Had this issue while reinstalling Unity 2019.4.8f1 with Android support. @Psyboyo 's fix caused hitting the retry button on that error to work.
     
  9. omar_5

    omar_5

    Joined:
    Feb 8, 2020
    Posts:
    8
    If anyone still have that problem, I've just deleted the folder AndroidPlayer; Unity\Hub\Editor\2019.4.3f1\Editor\Data\PlaybackEngines\AndroidPlayer
    and hit retry button
     
  10. Enginhk

    Enginhk

    Joined:
    Jun 14, 2013
    Posts:
    4
    Just delete the folder and click retry.
     
    jeremedia likes this.
  11. fanlya

    fanlya

    Joined:
    Oct 28, 2020
    Posts:
    1
    thanks i had same problem after downloading module on unity hub, after deleting androidplayer folder, i just click retry and its work
     
    monrrah likes this.
  12. Keita-kun

    Keita-kun

    Joined:
    Aug 20, 2017
    Posts:
    36
    COULD UNITY GIVE MORE CONTROL OVER THE UNITY HUB S***Y INSTALL PROCESS UNITY IS A GREAT SOFTWARE HANDS DOWN BUT UNITYHUB BIG TIME S*** ERRO INSTALL CLOTTERING HDD WITH TEMP INSTALL ERROR DUE TO PERMISSION / IMPERSONATING ADMIN RIGHT TO MANAGE FOLDER'S PERMISSION NEED TO USE ADMIN RIGHT TO EVEN START HUB MEMORY CONSUMING EVEN LOWERED ON THE TASKBAR JUST TO GET ACCESS TO PROJECT LIST AND TUTORIALS PLEASE I'D BE APPY WITH JUST A LINK TO TUTORIALS AND SMOOTH INSTALL PROCESS. DOWNLOADING GIGS OF DATA TO FAIL INSTALL AND REDO PROCESS AGAIN NO RESUME FROM SCRATCH AGAIN LOL.
     
    KeycapGames likes this.
  13. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,304
    Oh boy, this is pretty ridiculous. I tried installing 2019.3.12 via the hub but the "installer cannot remove files"-popup was waiting for me somewhere in the background. And I had wondered "WTF is this taking to long"? So, after seeing that popup, I found this thread that made me realize that Unity doesn't properly clean up during uninstall (but never warned me about that), which is what is causing the issue when you try to re-install a version you've previously had installed. So I manually cleaned up that mess (I had remains of about 5 Unity installations, most of them older ones, like 2019.3 and earlier).

    Now, I tried finally doing my 2019.3.12 install again but the links on https://unity3d.com/get-unity/download/archive no longer work for me. They do open Unity Hub - but Unity Hub won't start the installation. I've tried it with different Unity versions / links. This did work before. Now it doesn't. Tried it with both Firefox and Chrome, both with Unity Hub previous open, and Unity Hub previously closed. It opens (or is moved to the foreground if it already was open), but the installation doesn't start. Very useful.

    So now I'm going for a manual install. This is on Unity Hub 2.4.2.

    Now, the manual install is removing my 2019.4.17 installation that I'd actually rather keep ... and that uninstall is taking forever, and ironically runs into the same issue again (and funny enough, now that popup was pushed to the foreground while I was typing this, so I accidentally closed it).

    And all of this because 2019.4.17 fails building to Android without giving a useful error message and I'm trying to figure out what the problem with this is.

    Thank you for wasting my time, Unity.

    Ok, so now I have 2019.3.12 finally installed - but it doesn't properly register with Unity Hub. So it seems I won't be able to properly uninstall it.
     
  14. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,304
    That may or may not be necessary. It wasn't in my case.

    I think this is important: Go do C:\Program Files\Unity\Hub\Editor and look for editor versions that you actually currently don't have installed. You can confirm that either by comparing with what's shown in the Unity Hub (if you have all your installation in Unity Hub), or just looking into the folders and checking whether they have a full Unity installation, or just a few remaining folders. In my case, I've had a few that didn't have "AndroidPlayer" but other folders that would cause the same issues had I tried to install that specific version again before removing stuff manually.

    It also happens with older installations - but it only happens when you try to install a version that you had previously installed and then uninstalled. And it probably only happens with either certain Unity versions, or certain versions of the Unity Hub.
     
  15. domdev

    domdev

    Joined:
    Feb 2, 2015
    Posts:
    366
    this issue soo annoying..using 2020.2.1.f1.. it messed up my app cause I tought firebase admob and other plugins stuff is messing during building.. hope can fix this
     
  16. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,692
    @Psyboyo
    Amazing thanks!
    Just got that issue for the very first time on windows machine > 2021.1.6f1 o_O.
     
  17. bassarisse

    bassarisse

    Joined:
    Jun 13, 2018
    Posts:
    3
    Just had this error while installing 2020.3.14 on Unity Hub 3.0.0-beta.2.

    In case it can help someone: I fixed it by installing the Editor with only Android Build Support first, leaving the SDK/OpenJDK unmarked, and then I added these modules separately afterwards.

    When adding the modules, I did receive an error saying "Verification failed" in Android Build Support, but everything seems to run fine now.
     
    BaraShiro, Octoverse and aburger22 like this.
  18. TheVirtualMunk

    TheVirtualMunk

    Joined:
    Sep 6, 2019
    Posts:
    124
    Can confirm the 3.0 beta F***ed med up as well. Downgraded back to old hub and reinstalled the editor. Got the error once again, but clicked retry, and now everything worked as expected.
     
  19. VanTa_

    VanTa_

    Joined:
    Nov 19, 2014
    Posts:
    3
    Yes, For me too. "Downgrading" to Hub version 2 and reinstalling the Editor fixed it for me as well.
     
    duguwu and jorgeolothar like this.
  20. jorgeolothar

    jorgeolothar

    Joined:
    Mar 27, 2016
    Posts:
    21
    Downgrading from Unity Hub beta worked for me
     
  21. od3098

    od3098

    Joined:
    Apr 29, 2015
    Posts:
    45
    This method worked for me.
     
    Zuicis likes this.
  22. aburger22

    aburger22

    Joined:
    May 19, 2020
    Posts:
    1
    After encountering this issue I tested both your method and the method @Psyboyo provided and both worked for 2020.3.16f1 on Unity Hub 3.0.0-beta.2. Seems like Unity Hub 3.0.0-beta.2. brought this issue back.
     
  23. Octoverse

    Octoverse

    Joined:
    Oct 14, 2018
    Posts:
    20
    Thanks! This method worked here.
     
  24. Kerihobo

    Kerihobo

    Joined:
    Jun 26, 2013
    Posts:
    56
    This... REALLY needs to go into Unity's docs:https://docs.unity3d.com/Manual/android-sdksetup.html
     
    IslandLabsKReguieg and Octoverse like this.
  25. unity_QyhvAKGjNQZwCQ

    unity_QyhvAKGjNQZwCQ

    Joined:
    Jul 26, 2019
    Posts:
    1
    Just want to point out that in my case, deleting the AndroidPlayer directory didn't quite work as expected. I noticed that before deleting it there were 3 directories in it (OpenJDK, SDK, and NDK). Then when I clicked retry, it didn't install any of these. It seems to me like the beta2 Hub has some kind of race condition when installing, which would explain why things worked for @bassarisse when installing the Android support first, and then the sdks.

    My solution was to click ignore.

    I was installing Unity 2021.1.21f1 using Unity Hub 3.0.0-beta 2

    [Update] While ignoring seems to leave the OpenJDK, and other directories, it seems the installation does not complete correctly. I noticed that I was missing the bin directory under OpenJDK. Re-installing and following @bassarisse's advice fixed my problem
     
    Last edited: Sep 17, 2021
  26. ChiuanWei

    ChiuanWei

    Joined:
    Jan 29, 2012
    Posts:
    122
    i have the same problem....using Unity Hub 3.0.0-beta 4
    ....:(:(:(:(:(:(:(:(:(.....
     
  27. CyberDyme-Andrei

    CyberDyme-Andrei

    Joined:
    Jul 22, 2021
    Posts:
    2
    Same here ...

    Using Unity Hub 3.0.0-beta 4 I get this error and the installation stops. When I manually install those exes (UnitySetup-Android-Support-for-Editor-2021.1.11f1) it works - I do not get that error, but then I can not install the actual SDK, JDK and gradle which are in 2 zip files ...
     
  28. CyberDyme-Andrei

    CyberDyme-Andrei

    Joined:
    Jul 22, 2021
    Posts:
    2
    To fix the error I had to switch to the latest stable HUB build 2.4.5

    Everything worked like a charm ....
     
    pixelR and artiku like this.
  29. seacharge

    seacharge

    Joined:
    May 25, 2018
    Posts:
    4
    I can confirm, this method works on Unity Hub 3.0 Beta 4.
     
  30. kiiri2

    kiiri2

    Joined:
    Feb 15, 2017
    Posts:
    4
    Downgrading from Unity Hub beta to the last Unity Hub 2.4.x and reinstalling the Unity version will all Android modules worked for me.
     
  31. tHISiShEISENBERG

    tHISiShEISENBERG

    Joined:
    Feb 11, 2021
    Posts:
    1

    mahnn! It worked......
     
  32. BaraShiro

    BaraShiro

    Joined:
    Jul 10, 2017
    Posts:
    4
    This worked. Thanks!
     
  33. pixelR

    pixelR

    Joined:
    Sep 16, 2013
    Posts:
    58
    Can confirm, I was using Unity Hub 3.0 Beta 4 and had the same problem. Downgrading to stable solves the issue. Hub v3 is nice, but not crucial to have at the moment, especially if it's still buggy.
     
  34. Gigacee

    Gigacee

    Joined:
    Mar 4, 2015
    Posts:
    48
    Same issue here, Unity Hub 3.0 Beta 5.
    I tried it on two different machines, Windows 11 and Windows 10, and this error occured on both.
     
  35. turrncp

    turrncp

    Joined:
    Sep 26, 2019
    Posts:
    1
    Thank You <3
     
  36. GenSandman

    GenSandman

    Joined:
    Dec 23, 2015
    Posts:
    1
    Basically, a year later this has fixed my problem. Thank you so much!
     
  37. Cyber_Balls

    Cyber_Balls

    Joined:
    Jan 12, 2021
    Posts:
    3
    Bro you literally saved me. Thank you!
     
  38. ypermat

    ypermat

    Joined:
    Sep 22, 2020
    Posts:
    3
    Hello my mans !

    I still have the problem.
    With your solution, once downloaded, android support does not isntall JDK, SDK and NDK.

    However, when I (re)install Unity, I have a message like "Unity could not delete old android files". But theses files are thoses who just have been installed BY Unity.
    I so have Continue, Retry, Ignore.
    • Give up does nothing
    • Ignore ignore...
    • And Retry deletes the JDK, SDK and NDK and re open the error.
    On the screenshot I clicked Retry on time and SDK disappeared.....


    What can I do ? Thank by advance !
     
    Last edited: Oct 19, 2021
  39. ypermat

    ypermat

    Joined:
    Sep 22, 2020
    Posts:
    3
    OK So with all theses answers, the best way to solve all of this is to :
    • NOT install the Unity Hub Beta.
    • Uninstall Unity.
    • Install unity in an other file than programs (which does not gives enough rights to Unity Installer) with the packages.
    • Install your game file in a file that gives enough rights to Unity.

    This should works
     
  40. votagus

    votagus

    Joined:
    Dec 13, 2016
    Posts:
    15
    I had the same problem, for me the fix was installing outside Program files, so ended up in C:\Unity, no need to unistall hub beta.
     
  41. Jorhoto

    Jorhoto

    Joined:
    May 7, 2019
    Posts:
    99
    Same issue here :confused:

    I just installed 2020.3.21, having previously 2020.3.19 (Unity Hub Beta 3.5).
     
  42. igorkiselyov74

    igorkiselyov74

    Joined:
    Jun 4, 2017
    Posts:
    2
    Yeah, same thing with 2020.3.21f - solution above is not working for me. Manual installation runs fine, but Android Support is not detected by Unity Hub for some reason.
     
  43. chenghaokan

    chenghaokan

    Joined:
    May 16, 2018
    Posts:
    4
    Don't know if it helps but this problem happened whenever i was using Unity Hub 3.0.0. Returning back to Unity Hub v2 and reinstalling the editor from it helped me to solve it.

    Tried on Unity Hub 3.0.0-beta.2 and beta.5

    -----

    Seems that everyone has the same issue :)
    #FIXITNOW
     
    Last edited: Oct 25, 2021
  44. iunoj4256

    iunoj4256

    Joined:
    Oct 20, 2021
    Posts:
    1
    Install One By One can solve it
     
  45. Gigacee

    Gigacee

    Joined:
    Mar 4, 2015
    Posts:
    48
    The release notes for v3.0.0-beta.6 say:
    I tried installing Unity 2021.1.27f1 with v3.0.0-beta.6 and no errors occurred :)
     
  46. Gigacee

    Gigacee

    Joined:
    Mar 4, 2015
    Posts:
    48
    Unfortunately, even though the error dialog is no longer displayed, the bug still exists.
    The Unity Editor installed with Unity Hub v3.0.0-beta.6 does not recognize the Android module correctly.
     

    Attached Files:

  47. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,329
    Not sure if it applies in your case, but note the path. You previous message says you installed Unity 2021.1.27f1 but the path says Unity 2021.1.24f1. This happened to me yesterday, I had to change the path to match the Unity version I just installed, it seems to remember the path from a previous install. I'm using Hub 2.4.5
     
  48. fantasticngc

    fantasticngc

    Joined:
    Oct 18, 2021
    Posts:
    1
    This works!!! Thank you man! The issue confused me about 1 week!!!
     
  49. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    857
    Unity Hub 3.1.2 still has this issue. I always need PC reboot for installing new Unity version. Its extremely annoying.
     
  50. Eozgungor

    Eozgungor

    Joined:
    Jun 10, 2022
    Posts:
    1
    This helped me a lot thank you so much
     
unityunity