FileNotFoundException: Could not find file

Please translate everything

I have been stuck with this issue for 4 days

I’m confused why every time I build, I get an error like this:

FileNotFoundException: Could not find file ‘C:\Users\Frendy\Unity_Projek\SevenDays\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\build\outputs\apk\release\launcher-release.apk’. System.IO.FileSystem.CopyFile (System.String sourceFullPath, System.String destFullPath, System.Boolean overwrite) (at :0) System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) (at :0) UnityEditor.Android.PostProcessor.Tasks.MoveFinalPackage.CopyWithCondition (UnityEditor.Android.PostProcessor.Tasks.MoveFinalPackage+CopyInfo file, System.String role, System.Func`2[T,TResult] copyCondition) (at <4dc1d0a718e0407a933f0c4ccedea786>:0) UnityEditor.Android.PostProcessor.Tasks.MoveFinalPackage.CopyIfNewer (UnityEditor.Android.PostProcessor.Tasks.MoveFinalPackage+CopyInfo file, System.String role) (at <4dc1d0a718e0407a933f0c4ccedea786>:0) UnityEditor.Android.PostProcessor.Tasks.MoveFinalPackage.CopyIfNewerAPKs () (at <4dc1d0a718e0407a933f0c4ccedea786>:0) UnityEditor.Android.PostProcessor.Tasks.MoveFinalPackage.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <4dc1d0a718e0407a933f0c4ccedea786>:0) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <4dc1d0a718e0407a933f0c4ccedea786>:0) UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, AndroidPlayerBuildProgram.Data.AndroidPlayerBuildProgramOutput buildProgramOutput) (at <4dc1d0a718e0407a933f0c4ccedea786>:0) UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <4dc1d0a718e0407a933f0c4ccedea786>:0) UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at :0) UnityEditor.EditorApplication:Internal_CallDelayFunctions()

Then when I checked the folder:

C:\Users\Frendy\Unity_Projek\SevenDays\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\build\outputs\apk\release

The only files there are:

baselineProfiles (folder)
launcher-release-unsigned.apk
output-metadata.json

Then I’ve tried a clean build, but the error is still the same.

And I’ve also entered my Unity key.

How to troubleshoot build failures:

Obviously, if there is actionable data, clues or information within any of the errors, fix those problems. Each error entry may have more information than can fit in the console log so select each error and read the expanded view below it.

If that gives you nothing worthwhile (look to Google! You’re never the first one!), then…

First, make a blank project with a single blank scene and prove that it builds successfully.

If the blank project does NOT build, go fix your Unity installation or your other tools, such as Android SDK, NDK, JDK, etc. It may even be necessary to change to a different version of Unity3D. It is generally best to stay with LTS versions of Unity3D.

Until you can build a blank project to the target platform, don’t fiddle with anything else.

Once you can build a blank project, now bisect the problem by bringing over parts of your current project and building it one subsystem at a time, perhaps stubbing things out that might trigger compiler errors.

Most often things that prevent building are misconfigured or incorrectly-installed or incompatible third-party libraries such as Firebase or AdMob or IronSource.

Once you identify the subsystem, go to the documentation for it and make sure you are doing it correctly.

It may also be helpful to work through a tutorial or two for whatever subsystem is making the build fail.

Android build not building:

Circa July 2022 here have been reports of Unity’s installer failing to install the Android Tools.

Here was how I brought up Unity2020.3.41 and the Android SDK 31 on October 30, 2022 (edited on August 23, 2023 to include Android SDK 33…) (and again for SDK34):

Android Gradle errors and other related stuff:

Android SDK35 stuff:

I tried to install gpgs version 2.0.0, previously I managed to build gpgs version 0.11.01 but when running the application, the script did not run properly so I upgraded gpgs.

Any suggestions? I failed to build because of that, and I searched on google, the solution is to create a key to sign, I don’t understand, can someone help me?

Thanks

Yeah, GPGS is one of the most difficult third party kits to install.

Your best hope is to work steadily through the basics of the install process as documented. There’s nothing more I can add beyond what links com up in Google. The last time I even attempted GPGS was 2020 or so and it took several weeks on and off for our team.

There’s certainly lots of tutorials online for that. Not only that but just like GPGS itself, how Android keys are signed / stored has changed over time, so make sure you are only working from recent tutorials and guides.

i dont have a team, im just trying to figure this out all by myself

i feel frustrated because i have been stuck here for 4-5 days

i tried searching on youtube but its all been years old, and they are using version 0.11.01 which is outdated and doesnt work for me

the problem is just this

initially there were a lot of problems in gradle, and I changed it until this end

FileNotFoundException: Could not find file ‘C:\Users\Frendy\Unity_Projek\SevenDays\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\build\outputs\apk\release\launcher-release.apk’.
System.IO.FileSystem.CopyFile(System.String sourceFullPath, System.String destFullPath, System.Boolean overwrite) (at :0)
System.IO.File.Copy(System.String sourceFileName, System.String destFileName, System.Boolean overwrite) (at :0)
UnityEditor.Android.PostProcessor.Tasks.MoveFinalPackage.CopyWithCondition (UnityEditor.Android.PostProcessor.Tasks.MoveFinalPackage+CopyInfo file, System.String role, System.Func`2[T,TResult] copyCondition) (at <4dc1d0a718e0407a933f0c4ccedea786>:0)
UnityEditor.Android.PostProcessor.Tasks.MoveFinalPackage.CopyIfNewer (UnityEditor.Android.PostProcessor.Tasks.MoveFinalPackage+CopyInfo file, System.String role) (at <4dc1d0a718e0407a933f0c4ccedea786>:0)
UnityEditor.Android.PostProcessor.Tasks.MoveFinalPackage.CopyIfNewerAPKs() (at <4dc1d0a718e0407a933f0c4ccedea786>:0)
UnityEditor.Android.PostProcessor.Tasks.MoveFinalPackage.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <4dc1d0a718e0407a933f0c4ccedea786>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <4dc1d0a718e0407a933f0c4ccedea786>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, AndroidPlayerBuildProgram.Data.AndroidPlayerBuildProgramOutput buildProgramOutput) (at <4dc1d0a718e0407a933f0c4ccedea786>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <4dc1d0a718e0407a933f0c4ccedea786>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at :0)
UnityEditor.EditorApplication:Internal_CallDelayFunctions()

Build completed with a result of ‘Failed’ in 30 seconds (30495 ms)
2 errors
UnityEditor.EditorApplication:Internal_CallDelayFunctions()

Is version 0.11.01 usable from Google’s standpoint? That will be something you can check in the docs.

If 0.11.01 is usable, did you debug it and find out what the actual problem was with 0.11.01 ?

Stopping at “doesn’t work” isn’t going to get you far… this stuff needs diligent tracking and debugging and log checking.

you are right, i didn’t get any news about version 0.11.0.1 not being usable anymore

i just came to that conclusion because i have exactly followed the youtube tutorial out there, but there was no error at all, it’s just that when trying on android, the script didn’t work at all

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • Where:
    Build file ‘C:\Users\Frendy\Unity_Projek\SevenDays\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\build.gradle’ line: 116

  • What went wrong:
    Could not compile build file ‘C:\Users\Frendy\Unity_Projek\SevenDays\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\build.gradle’.

startup failed:
build file ‘C:\Users\Frendy\Unity_Projek\SevenDays\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\build.gradle’: 116: Unexpected input: ‘{\n jniLibs {\n useLegacyPackaging true\n }\n }\n}’ @ line 116, column 1.
}
^

1 error

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.
==============================================================================

2: Task failed with an exception.

  • What went wrong:
    A problem occurred configuring project ‘:launcher’.

com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.
==============================================================================

BUILD FAILED in 1s

UnityEditor.EditorApplication:Internal_CallDelayFunctions ()

this is the problem before

until i changed a little bit the problem

but when i changed it
and build error occurred so i tried exiting unity and reopening

problem back to gradle unity library

I have succeeded

I tried many things on gradle and finally it worked

For those of you who have similar problems

Try checking your gradle

1 Like