Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Our response to Improbable’s blog post (and why you can keep working on your SpatialOS game). Read more here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Android App Bundle (.aab) FileNotFoundException when building

Discussion in 'Editor & General Support' started by Raisanen, Jan 9, 2019.

  1. Raisanen

    Raisanen

    Joined:
    Jan 18, 2017
    Posts:
    3
    Hi,
    I just updated the Unity to version 2018.3.0f2 and tried building the .aab file from my project. Unity said the build was successful, but it also threw this error and there is no build.

    Any ideas how to solve this or what could be the issue?

    FileNotFoundException: Temp/gradleOut/build/outputs/bundle/release/gradleOut.aab does not exist
    System.IO.File.Move (System.String sourceFileName, System.String destFileName) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:318)
    UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties)
    UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:286)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  2. boriss_unity

    boriss_unity

    Unity Technologies

    Joined:
    Oct 11, 2017
    Posts:
    1
    Hi,
    Do you see any aab file in Temp/gradleOut/build/outputs/bundle/release/ directory?
     
  3. marcello_unity

    marcello_unity

    Joined:
    Aug 22, 2018
    Posts:
    1
    Same thing happening here, there is no aab file in Temp/gradleOut/build/outputs/bundle/release/.
     
  4. spleendays

    spleendays

    Joined:
    Jul 21, 2013
    Posts:
    1
    Hi,

    Are you using a custom gradle file ? (Player Settings > Checkbox named "Custom Gradle Template")

    I had this exact same error, that i eventually managed to fix by updating the content of my mainTemplate.gradle file (which is located in Assets/Plugins/Android ), after comparing it with the default gradle template of Unity 2018.3.1f1 :

    [path to Unity]/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/mainTemplate.gradle


    I was so excited by the idea of being able to build an aab file (android aab files allow users to get smaller, more optimized downloads) that i completely forgot to double check the content of the new gradle template :)

    The following thread appeared to be a livesaver to me :

    https://forum.unity.com/threads/gradle-error-during-android-building.569113/

    (check ScottyB's post)
     
    Last edited: Jan 13, 2019 at 7:30 AM
    marcello_unity likes this.