Search Unity

Android NDK & JDK installation keeps failing or is incomplete

Discussion in 'Unity Hub' started by Xarbrough, Jan 14, 2021.

  1. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,188
    I've successfully installed Unity 2020.2.1 with the Android module and NDK + JDK on one of my machines today, but on the other computer, it keeps failing. The base installation and other platforms such as iOS work, but the NDK and JDK folders within the editor installation directory remain empty. The hub does not report any error, but the Android symbol is missing which indicated the issue to me. So I tried to reinstall, which leads to:

    Failed to delete old Unity Android Support installation files. Maybe Unity or some of its tools are still running?

    However, this computer was just rebooted, and even after another reboot and uninstall attempt, this happens. I tried to uninstall and also manually delete everything and attempt the entire installation three more times, but nothing helped.

    Now, after the fourth attempt, it looks as if the JDK and NDK are partially installed, but the SDK Tools are missing.

    What's going on here and how can I fix it?

    Here's the Unity Hub log, after a couple of tries I managed to capture some error messages:

    {"moduleName":"EditorDownloader","level":"info","message":"[ 'Editor Downloader 2020.2.1f1: starting' ]","timestamp":"2021-01-14T16:08:36.879Z"}
    {"moduleName":"DownloadsCluster","level":"info","message":"[ 'Cluster total download size: 1.79GB' ]","timestamp":"2021-01-14T16:08:36.975Z"}
    {"moduleName":"DownloadsCluster","level":"info","message":"[ 'Cluster cluster-2020.2.1f1: downloads starting' ]","timestamp":"2021-01-14T16:08:36.976Z"}
    {"moduleName":"DownloadRequest","level":"info","message":"[ 'Starting the download of https://download.unity3d.com/downlo...tup-Android-Support-for-Editor-2020.2.1f1.exe to C:\\\\Users\\\\admin\\\\AppData\\\\Local\\\\Temp\\\\unityhub-c232abd0-5682-11eb-86fd-573d87728f91\\\\UnitySetup-Android-Support-for-Editor-2020.2.1f1.exe' ]","timestamp":"2021-01-14T16:08:36.977Z"}
    {"moduleName":"DownloadRequest","level":"info","message":"[ 'Starting the download of https://download.unity3d.com/downlo...tySetup-iOS-Support-for-Editor-2020.2.1f1.exe to C:\\\\Users\\\\admin\\\\AppData\\\\Local\\\\Temp\\\\unityhub-c232abd0-5682-11eb-86fd-573d87728f91\\\\UnitySetup-iOS-Support-for-Editor-2020.2.1f1.exe' ]","timestamp":"2021-01-14T16:08:36.979Z"}
    {"moduleName":"DownloadRequest","level":"info","message":"[ 'Starting the download of https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip to C:\\\\Users\\\\admin\\\\AppData\\\\Local\\\\Temp\\\\unityhub-c232abd0-5682-11eb-86fd-573d87728f91\\\\sdk-tools-windows-4333796.zip' ]","timestamp":"2021-01-14T16:08:36.979Z"}
    {"moduleName":"DownloadRequest","level":"info","message":"[ 'Starting the download of https://dl.google.com/android/repository/platform-tools_r28.0.1-windows.zip to C:\\\\Users\\\\admin\\\\AppData\\\\Local\\\\Temp\\\\unityhub-c232abd0-5682-11eb-86fd-573d87728f91\\\\platform-tools_r28.0.1-windows.zip' ]","timestamp":"2021-01-14T16:08:36.980Z"}
    {"moduleName":"DownloadRequest","level":"info","message":"[ 'Starting the download of https://dl.google.com/android/repository/build-tools_r28.0.3-windows.zip to C:\\\\Users\\\\admin\\\\AppData\\\\Local\\\\Temp\\\\unityhub-c232abd0-5682-11eb-86fd-573d87728f91\\\\build-tools_r28.0.3-windows.zip' ]","timestamp":"2021-01-14T16:08:36.980Z"}
    {"moduleName":"DownloadRequest","level":"info","message":"[ 'Starting the download of https://dl.google.com/android/repository/platform-29_r05.zip to C:\\\\Users\\\\admin\\\\AppData\\\\Local\\\\Temp\\\\unityhub-c232abd0-5682-11eb-86fd-573d87728f91\\\\platform-29_r05.zip' ]","timestamp":"2021-01-14T16:08:36.980Z"}
    {"moduleName":"DownloadRequest","level":"info","message":"[ 'Starting the download of https://dl.google.com/android/repository/android-ndk-r19-windows-x86_64.zip to C:\\\\Users\\\\admin\\\\AppData\\\\Local\\\\Temp\\\\unityhub-c232abd0-5682-11eb-86fd-573d87728f91\\\\android-ndk-r19-windows-x86_64.zip' ]","timestamp":"2021-01-14T16:08:36.980Z"}
    {"moduleName":"DownloadRequest","level":"info","message":"[ 'Starting the download of http://download.unity3d.com/downloa...bc74128f6955cd90fd5afe15ea7be60f832de67b4.zip to C:\\\\Users\\\\admin\\\\AppData\\\\Local\\\\Temp\\\\unityhub-c232abd0-5682-11eb-86fd-573d87728f91\\\\jdk8u172-b11_4be8440cc514099cfe1b50cbc74128f6955cd90fd5afe15ea7be60f832de67b4.zip' ]","timestamp":"2021-01-14T16:08:36.980Z"}
    {"moduleName":"DownloadRequest","level":"info","message":"[ 'Starting the download of https://download.unity3d.com/downlo...64EditorInstaller/UnitySetup64-2020.2.1f1.exe to C:\\\\Users\\\\admin\\\\AppData\\\\Local\\\\Temp\\\\unityhub-c232abd0-5682-11eb-86fd-573d87728f91\\\\UnitySetup64-2020.2.1f1.exe' ]","timestamp":"2021-01-14T16:08:37.154Z"}
    {"moduleName":"EditorDownloader","level":"info","message":"[ 'Editor Download 2020.2.1f1: downloads starting, total size: 4.29GB)' ]","timestamp":"2021-01-14T16:08:37.154Z"}
    {"moduleName":"DownloadRequest","level":"warn","message":"[ 'Something went wrong while downloading https://dl.google.com/android/repository/platform-tools_r28.0.1-windows.zip Error: ESOCKETTIMEDOUT Error: ESOCKETTIMEDOUT\\n at ClientRequest.<anonymous> (C:\\\\Program Files\\\\Unity Hub\\\\resources\\\\app.asar\\\\node_modules\\\\request\\\\request.js:816:19)\\n at Object.onceWrapper (events.js:282:20)\\n at ClientRequest.emit (events.js:194:13)\\n at ClientRequest.EventEmitter.emit (domain.js:469:20)\\n at TLSSocket.emitRequestTimeout (_http_client.js:673:40)\\n at Object.onceWrapper (events.js:282:20)\\n at TLSSocket.emit (events.js:194:13)\\n at TLSSocket.EventEmitter.emit (domain.js:469:20)\\n at TLSSocket.Socket._onTimeout (net.js:429:8)\\n at listOnTimeout (internal/timers.js:535:17)' ]","timestamp":"2021-01-14T16:09:16.227Z"}
    {"moduleName":"DownloadRequest","level":"warn","message":"[ 'Something went wrong while checking progress of https://dl.google.com/android/repository/platform-tools_r28.0.1-windows.zip Error: ESOCKETTIMEDOUT Error: ESOCKETTIMEDOUT\\n at ClientRequest.<anonymous> (C:\\\\Program Files\\\\Unity Hub\\\\resources\\\\app.asar\\\\node_modules\\\\request\\\\request.js:816:19)\\n at Object.onceWrapper (events.js:282:20)\\n at ClientRequest.emit (events.js:194:13)\\n at ClientRequest.EventEmitter.emit (domain.js:469:20)\\n at TLSSocket.emitRequestTimeout (_http_client.js:673:40)\\n at Object.onceWrapper (events.js:282:20)\\n at TLSSocket.emit (events.js:194:13)\\n at TLSSocket.EventEmitter.emit (domain.js:469:20)\\n at TLSSocket.Socket._onTimeout (net.js:429:8)\\n at listOnTimeout (internal/timers.js:535:17)' ]","timestamp":"2021-01-14T16:09:16.227Z"}
    {"moduleName":"DownloadManager","level":"info","message":"[ 'download ended with status: 3 C:\\\\Users\\\\admin\\\\AppData\\\\Local\\\\Temp\\\\unityhub-c232abd0-5682-11eb-86fd-573d87728f91\\\\platform-tools_r28.0.1-windows.zip' ]","timestamp":"2021-01-14T16:09:16.227Z"}
    {"moduleName":"DownloadManager","level":"info","message":"[ 'download ended with status: 3 C:\\\\Users\\\\admin\\\\AppData\\\\Local\\\\Temp\\\\unityhub-c232abd0-5682-11eb-86fd-573d87728f91\\\\jdk8u172-b11_4be8440cc514099cfe1b50cbc74128f6955cd90fd5afe15ea7be60f832de67b4.zip' ]","timestamp":"2021-01-14T16:09:18.787Z"}
    {"moduleName":"DownloadRequest","level":"warn","message":"[ 'Something went wrong while downloading https://dl.google.com/android/repository/build-tools_r28.0.3-windows.zip Error: ESOCKETTIMEDOUT Error: ESOCKETTIMEDOUT\\n at ClientRequest.<anonymous> (C:\\\\Program Files\\\\Unity Hub\\\\resources\\\\app.asar\\\\node_modules\\\\request\\\\request.js:816:19)\\n at Object.onceWrapper (events.js:282:20)\\n at ClientRequest.emit (events.js:194:13)\\n at ClientRequest.EventEmitter.emit (domain.js:469:20)\\n at TLSSocket.emitRequestTimeout (_http_client.js:673:40)\\n at Object.onceWrapper (events.js:282:20)\\n at TLSSocket.emit (events.js:194:13)\\n at TLSSocket.EventEmitter.emit (domain.js:469:20)\\n at TLSSocket.Socket._onTimeout (net.js:429:8)\\n at listOnTimeout (internal/timers.js:535:17)' ]","timestamp":"2021-01-14T16:10:18.960Z"}
    {"moduleName":"DownloadRequest","level":"warn","message":"[ 'Something went wrong while checking progress of https://dl.google.com/android/repository/build-tools_r28.0.3-windows.zip Error: ESOCKETTIMEDOUT Error: ESOCKETTIMEDOUT\\n at ClientRequest.<anonymous> (C:\\\\Program Files\\\\Unity Hub\\\\resources\\\\app.asar\\\\node_modules\\\\request\\\\request.js:816:19)\\n at Object.onceWrapper (events.js:282:20)\\n at ClientRequest.emit (events.js:194:13)\\n at ClientRequest.EventEmitter.emit (domain.js:469:20)\\n at TLSSocket.emitRequestTimeout (_http_client.js:673:40)\\n at Object.onceWrapper (events.js:282:20)\\n at TLSSocket.emit (events.js:194:13)\\n at TLSSocket.EventEmitter.emit (domain.js:469:20)\\n at TLSSocket.Socket._onTimeout (net.js:429:8)\\n at listOnTimeout (internal/timers.js:535:17)' ]","timestamp":"2021-01-14T16:10:18.961Z"}
    {"moduleName":"DownloadManager","level":"info","message":"[ 'download ended with status: 3 C:\\\\Users\\\\admin\\\\AppData\\\\Local\\\\Temp\\\\unityhub-c232abd0-5682-11eb-86fd-573d87728f91\\\\build-tools_r28.0.3-windows.zip' ]","timestamp":"2021-01-14T16:10:18.961Z"}
    {"moduleName":"CloudConfig","level":"info","message":"[ 'Failed to refresh data, fallback to default data. Reason: getaddrinfo ENOTFOUND public-cdn.cloud.unity3d.com' ]","timestamp":"2021-01-14T16:10:19.645Z"}
    {"moduleName":"learnContentService","level":"info","message":"[ 'Failed to refresh data, fallback to default data. Reason: getaddrinfo ENOTFOUND learn.unity.com' ]","timestamp":"2021-01-14T16:10:19.860Z"}
    {"moduleName":"DownloadRequest","level":"warn","message":"[ 'Something went wrong while downloading https://dl.google.com/android/repository/platform-29_r05.zip Error: ESOCKETTIMEDOUT Error: ESOCKETTIMEDOUT\\n at ClientRequest.<anonymous> (C:\\\\Program Files\\\\Unity Hub\\\\resources\\\\app.asar\\\\node_modules\\\\request\\\\request.js:816:19)\\n at Object.onceWrapper (events.js:282:20)\\n at ClientRequest.emit (events.js:194:13)\\n at ClientRequest.EventEmitter.emit (domain.js:469:20)\\n at TLSSocket.emitRequestTimeout (_http_client.js:673:40)\\n at Object.onceWrapper (events.js:282:20)\\n at TLSSocket.emit (events.js:194:13)\\n at TLSSocket.EventEmitter.emit (domain.js:469:20)\\n at TLSSocket.Socket._onTimeout (net.js:429:8)\\n at listOnTimeout (internal/timers.js:535:17)' ]","timestamp":"2021-01-14T16:10:39.408Z"}
    {"moduleName":"DownloadRequest","level":"warn","message":"[ 'Something went wrong while checking progress of https://dl.google.com/android/repository/platform-29_r05.zip Error: ESOCKETTIMEDOUT Error: ESOCKETTIMEDOUT\\n at ClientRequest.<anonymous> (C:\\\\Program Files\\\\Unity Hub\\\\resources\\\\app.asar\\\\node_modules\\\\request\\\\request.js:816:19)\\n at Object.onceWrapper (events.js:282:20)\\n at ClientRequest.emit (events.js:194:13)\\n at ClientRequest.EventEmitter.emit (domain.js:469:20)\\n at TLSSocket.emitRequestTimeout (_http_client.js:673:40)\\n at Object.onceWrapper (events.js:282:20)\\n at TLSSocket.emit (events.js:194:13)\\n at TLSSocket.EventEmitter.emit (domain.js:469:20)\\n at TLSSocket.Socket._onTimeout (net.js:429:8)\\n at listOnTimeout (internal/timers.js:535:17)' ]","timestamp":"2021-01-14T16:10:39.408Z"}
    {"moduleName":"DownloadManager","level":"info","message":"[ 'download ended with status: 3 C:\\\\Users\\\\admin\\\\AppData\\\\Local\\\\Temp\\\\unityhub-c232abd0-5682-11eb-86fd-573d87728f91\\\\platform-29_r05.zip' ]","timestamp":"2021-01-14T16:10:39.408Z"}
    {"moduleName":"DownloadManager","level":"info","message":"[ 'download ended with status: 3 C:\\\\Users\\\\admin\\\\AppData\\\\Local\\\\Temp\\\\unityhub-c232abd0-5682-11eb-86fd-573d87728f91\\\\UnitySetup-Android-Support-for-Editor-2020.2.1f1.exe' ]","timestamp":"2021-01-14T16:10:40.844Z"}
    {"moduleName":"DownloadManager","level":"info","message":"[ 'download ended with status: 3 C:\\\\Users\\\\admin\\\\AppData\\\\Local\\\\Temp\\\\unityhub-c232abd0-5682-11eb-86fd-573d87728f91\\\\UnitySetup-iOS-Support-for-Editor-2020.2.1f1.exe' ]","timestamp":"2021-01-14T16:10:40.844Z"}
    {"moduleName":"DownloadManager","level":"info","message":"[ 'download ended with status: 3 C:\\\\Users\\\\admin\\\\AppData\\\\Local\\\\Temp\\\\unityhub-c232abd0-5682-11eb-86fd-573d87728f91\\\\sdk-tools-windows-4333796.zip' ]","timestamp":"2021-01-14T16:11:19.002Z"}
    {"moduleName":"EditorDownloader","level":"info","message":"[ 'Editor Downloader 2020.2.1f1: end event for editor' ]","timestamp":"2021-01-14T16:14:32.861Z"}
    {"moduleName":"DownloadManager","level":"info","message":"[ 'download ended with status: 3 C:\\\\Users\\\\admin\\\\AppData\\\\Local\\\\Temp\\\\unityhub-c232abd0-5682-11eb-86fd-573d87728f91\\\\UnitySetup64-2020.2.1f1.exe' ]","timestamp":"2021-01-14T16:14:32.861Z"}
    {"moduleName":"DownloadsCluster","level":"info","message":"[ 'Cluster cluster-2020.2.1f1: Finished' ]","timestamp":"2021-01-14T16:14:47.085Z"}
    {"moduleName":"EditorDownloader","level":"info","message":"[ 'Editor Downloader 2020.2.1f1: end event for cluster' ]","timestamp":"2021-01-14T16:14:47.085Z"}
    {"moduleName":"EditorDownloader","level":"info","message":"[ 'Editor Download 2020.2.1f1: Finished' ]","timestamp":"2021-01-14T16:14:47.085Z"}
    {"moduleName":"DownloadManager","level":"info","message":"[ 'download ended with status: 3 C:\\\\Users\\\\admin\\\\AppData\\\\Local\\\\Temp\\\\unityhub-c232abd0-5682-11eb-86fd-573d87728f91\\\\android-ndk-r19-windows-x86_64.zip' ]","timestamp":"2021-01-14T16:14:47.086Z"}
    {"moduleName":"Download","level":"info","message":"[ 'Editor download ended successfully. Download id: 2020.2.1f1' ]","timestamp":"2021-01-14T16:14:56.170Z"}

    The weird part is that the hub is now confused about what state it should be in. The checkboxes next to Android Build Support, SDK, and JDK are checked, but grayed out. So I can't remove them.
     
    Last edited: Jan 14, 2021
  2. deeboss

    deeboss

    Joined:
    Sep 12, 2018
    Posts:
    3
    i had the same issues too is there no way to get a unity engineer to address this issue with the jdk installation
     
  3. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,188
    I managed to solve my issue and believe that Unity should improve its error handling to report such issues to the user with more detailed information, but I don't have the time to set up a reproduction project for everything.

    So, I've investigated my issue by looking at the installation directories of the NDK and JDKs and compared them to a working Unity installation. I found that some folders were simply missing after the installation. I then wanted to manually fix the installation by copying the missing files from a different computer and Windows showed an error popup telling me that the file paths are too long. I then changed the hub editor installations folder to something shorter and then it was able to reinstall correctly.

    I'd love for the hub to surface these kinds of errors. Especially, since I was using the default installation path, and the upgraded Unity version together with the NDK/SDK had a few paths that were now suddenly longer than before.
     
    jorgeolothar and andreiagmu like this.
  4. andreiagmu

    andreiagmu

    Joined:
    Feb 20, 2014
    Posts:
    175
    Today, that same message ("Failed to delete old Unity Android Support installation files. Maybe Unity or some of its tools are still running?") appeared to me, while I was trying to install 2020.3.14f1 with Android platform.
    But in my case, I think it was something related to the Unity Hub v3 beta.

    My system is Windows 10.
    I was using Unity Hub v3, I tried to install Unity with the default installation folder, it caused that error message to appear.
    Then I tried shortening my default install folder to C:\Unity, but it still didn't work (same error).

    Finally, I reverted to Unity Hub v2 (I kept the shortened install folder, C:\Unity, just in case), then it finally installed Unity with Android platform, without issues.
     
    jorgeolothar likes this.