Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity 2018.2 Cloud Build Error: ! build failed - export directory is empty!

Discussion in 'Unity Build Automation' started by topXight, Oct 29, 2018.

  1. topXight

    topXight

    Joined:
    Feb 16, 2016
    Posts:
    38
    This issue seems to have been reported in past on this forum:
    [Builds failing] : export directory is empty! and here

    We started getting this error just now with Unity 2018.2.13f1. The local builds work fine. Unity2017.x builds work fine.

    =====================================
    build of 'android-test-2018-2-13f1' failed. ! build failed - export directory is empty!

    22330: Publishing build 9 of topxight-labs-llc/manoke-unity for target 'android-test-2018-2-13f1'...
    22331: Uploading extra_data/artifacts/icon.png ...done
    22332: Uploading extra_data/build_report/files.json ...done
    22333: Uploading extra_data/build_report/files.reflected.json ...done
    22334: Uploading extra_data/build_report/steps.json ...done
    22335: Uploading extra_data/build_report/steps.reflected.json ...done
    22336: Uploading extra_data/build_report/strippingInfo.json ...done
    22337: Uploading extra_data/build_report/summary.json ...done
    22338: Uploading extra_data/build_report/summary.reflected.json ...done

    22339: publishing finished successfully.
    22340: Zipping cache files from Library
    22341: done.
    22342: Build step 'Execute shell' marked build as failure
    22343: postbuildstatus finished successfully.
    22344: Finished: FAILURE
     
  2. fox

    fox

    Joined:
    Jan 14, 2009
    Posts:
    118
    We are having the same problem, using Unity 2018.1.7f1. Same error on both iOS and Android builds.
     
  3. topXight

    topXight

    Joined:
    Feb 16, 2016
    Posts:
    38
    Ok I managed to get this to work with following changes. You can try and see. if it helps your particular case:
    1. Since we are using Gradle build I had to update the mainTemplate.gradle file with the latest Unity supplied file in Unity/PlaybackEngines/AndrodiPlayer/Tools/GradleTemplates. Also ensured that under repositories google() is listed ahead of center()
    2. I edited ProjectSettings.asset for Facebook by changing facebookSdkVersion to plugin (from whatever number is shown).
    3. In Unity Cloud build configuration ensure Gradle build is selected (instead of Internal).
    4. Do a Clean Build
     
    Deleted User likes this.