Search Unity

Android build fails if a build.gradle specifies buildToolsVersion '27.0.3'

Discussion in 'Unity Build Automation' started by MechEthan, Nov 30, 2018.

  1. MechEthan

    MechEthan

    Joined:
    Mar 23, 2016
    Posts:
    166
    Key error message portion:
    [Unity] Failed to install the following SDK components:
    [Unity] [Android SDK Build-Tools 27.0.3]
    [Unity] The SDK directory (/UNITY_PATH/Unity/android/sdk_latest) is not writeable,

    I'm not sure what version of build tools
     /UNITY_PATH/Unity/android/sdk_latest
    actually contains, if its a 27.0.x, then I'm happy to change my build.gradle versions to temporarily work around this issue.
     
  2. dannyd

    dannyd

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    785
    That install of the android SDK is currently using version 27.0.1 of the build tools.
     
    MechEthan likes this.
  3. MechEthan

    MechEthan

    Joined:
    Mar 23, 2016
    Posts:
    166
    Thanks so much! Is there anything else I can do to work around this aside from editing a bunch of build.gradle files?

    Or do you think a fix on your end is coming in a day or two and I should just wait?
     
  4. dannyd

    dannyd

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    785
    Upgrading the installed version of the build tools there isn't planned in the short term.
     
  5. MechEthan

    MechEthan

    Joined:
    Mar 23, 2016
    Posts:
    166
    Understood! The error message made me wonder if it was intentionally read-only to disallow upgrading of build-tools at build time, and I guess it is.

    Is there a document/url you could point me to that I can use, long-term, to ensure my
    gradle.build
    files are compatible with Cloud Build?

    There's a lot of issues like these that crop up in the forums, (e.g. such and such not supported yet, etc.) so a compatibility matrix would be nice, even if some of the entries where "unknown". I'd much rather self-troubleshoot than bug you on the forums.
     
  6. MechEthan

    MechEthan

    Joined:
    Mar 23, 2016
    Posts:
    166
    Will updating to 2017.4.17f1 cause problems with Cloud Build, in that case?

    2017.4.17f1 Release Notes
    Features
    - Android: Added App Bundle generation support.​
    Backwards Compatibility Breaking Changes
    - Android: Android Gradle plugin is updated up to version 3.2
    - Android: Required Android build tools version is increased up to 28.0.3

    https://unity3d.com/unity/whatsnew/unity-2017.4.17
     
  7. dannyd

    dannyd

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    785
    Sorry, I missed your other post earlier this week. We don't have a doc outlining compatibility of android sdk versions / Unity versions in UCB.

    As for 2017.4.17f1, it will build with 28.0.3 as indicated (when it gets added shortly). If your gradle files specify a different version then yes that is likely to break until they are upgraded.
     
    MechEthan likes this.