Search Unity

Android NDK Path EditorPrefs Key Changed?

Discussion in 'Editor & General Support' started by austin-beck, Mar 4, 2019.

  1. austin-beck

    austin-beck

    Joined:
    Oct 28, 2015
    Posts:
    19
    As many have found, in order to build Android from BatchMode (for those who use Jenkins or any other sort of automated build pipeline), you have to explicitly set the AndroidSdkRoot and AndroidNdkRoot strings in EditorPrefs via script before invoking the actual BuildPipeline call. Apparently BatchMode doesn't read from EditorPrefs or something?

    Anyway, that's a thing. It has worked fine for us for years. Fast-forward to last week, when we update all of our projects to 2018.3.3, which involved updating the NDK from R13b to R16b - all of a sudden, builds start failing, the evident reason being that it can not find the Android NDK. Ok, cool, maybe they finally added a dedicated method to set it without having to manually call into EditorPrefs - let's go check out the release notes. No mention of anything like that, just that the NDK was updated.

    After an hour or so of trying different things, I decided to read through the EditorPrefs registry entries from a computer in which it was set manually, and only then did we come to find that there's a new key - "AndroidNdkRootR16b".

    I'm posting this for a couple reasons:
    1. I hope I can save someone else from ripping the hair off their heads
    2. To ask Unity to please throw things like this into the Release Notes in the future
     
    Last edited: Mar 4, 2019
  2. dri_richard

    dri_richard

    Joined:
    Mar 10, 2017
    Posts:
    153
    I just encountered this myself, and despite my best Googling only found your post after figuring it out and searching for 'AndroidNdkRootR16b' !
    +1 for better release notes.
     
  3. austin-beck

    austin-beck

    Joined:
    Oct 28, 2015
    Posts:
    19
    Ahhh sorry - I should have thought of SEO when deciding on a title since I was writing it with the intent to help people :(
     
  4. Konargus

    Konargus

    Joined:
    Nov 3, 2012
    Posts:
    1
    Thanks, mate