Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Bug (Case 1201831) Failed to build Android Build

Discussion in '2019.3 Beta' started by optimise, Nov 29, 2019.

  1. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    The build failed because of missing Android NDK but I'm sure I already install Android NDK at Unity Hub.

    upload_2019-11-29_13-54-40.png

    upload_2019-11-29_13-55-28.png
     
    gforeman likes this.
  2. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,092
    I've installed the new 2019.3.0f1 release candidate but I cannot make any IL2CPP Android build because the installed version of the Android NDK is "not found" and when I go to the Preferences -> External Tools the Android NDK Installed with Unity (recommended) is checked but the warning under it is "you are missing the recommended Android NDK. Install the recommended version with Unity Hub".
    Well this is the version installed with Unity Hub. Reinstalling Unity doesn't help with the problem nor does re-importing the project. It's a new empty project.

    When manually setting the path that installed by the Unity Hub it says that the version is incorrect. Even though when reading out the version of the NDK it is the exact same version as it should be?
    So either the check is broken or something else in Unity internally is broken for the NDK

    After going back to 2019.2.14 it tries to use the NDK of 2019.3, which is weird because it is ticked to use the NDK that comes installed with Unity Hub, it's almost as if it cannot detect its own version and use the NDK that got installed there.

    unity android ndk bug.png

    Everything did work on 2019.2.13 (before installing 2019.2.14 and 2019.3.0f1)

    Seems like I'm not the only one:
    https://forum.unity.com/threads/hub-2-2-0-unity-2019-2-14f1-cant-build-android-player.784685/
     
    Last edited: Nov 29, 2019
    gforeman likes this.
  3. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Last edited: Dec 9, 2019
    optimise and gforeman like this.
  4. LorenzoValente

    LorenzoValente

    Joined:
    May 2, 2019
    Posts:
    37
    Temporary fix that worked for me:
    Manually set the NDK path (it should be something like "C:\Program Files\Unity\Hub\Editor\2019.2.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\android-ndk-r16b") and RESTART unity.
     
    cryptomario likes this.
  5. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,092
    Yeah it's a subfolder that the default path didn't account for.
    I didn't have to restart the editor only add the 'android-ndk-r16b' folder to the path and build again.
     
    charlesb_rm likes this.