0

image resolver is stuck at 0%

Running Gradle...

E:\game project\spaceFighterMobile\Temp\PlayServicesResolverGradle\gradlew.bat --no-daemon -b "E:\game project\spaceFighterMobile\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=D:/installed/unity/6000.4.0a2/Editor/Data/PlaybackEngines/AndroidPlayer\SDK" "-PTARGET_DIR=E:\game project\spaceFighterMobile\Assets\Plugins\Android" "-PMAVEN_REPOS=https://maven.google.com/" "-PPACKAGES_TO_COPY=com.unity3d.ads:unity-ads:[4.12.0,4.13[" "-PUSE_JETIFIER=0" "-PDATA_BINDING_VERSION=8.10.0"
Executing command: E:\game project\spaceFighterMobile\Temp\PlayServicesResolverGradle\gradlew.bat --no-daemon -b "E:\game project\spaceFighterMobile\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=D:/installed/unity/6000.4.0a2/Editor/Data/PlaybackEngines/AndroidPlayer\SDK" "-PTARGET_DIR=E:\game project\spaceFighterMobile\Assets\Plugins\Android" "-PMAVEN_REPOS=https://maven.google.com/" "-PPACKAGES_TO_COPY=com.unity3d.ads:unity-ads:[4.12.0,4.13[" "-PUSE_JETIFIER=0" "-PDATA_BINDING_VERSION=8.10.0"

error on console

Win32Exception: ApplicationName='E:\game project\spaceFighterMobile\Temp\PlayServicesResolverGradle\gradlew.bat', CommandLine='--no-daemon -b "E:\game project\spaceFighterMobile\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=D:/installed/unity/6000.4.0a2/Editor/Data/PlaybackEngines/AndroidPlayer\SDK" "-PTARGET_DIR=E:\game project\spaceFighterMobile\Assets\Plugins\Android" "-PMAVEN_REPOS=https://maven.google.com/" "-PPACKAGES_TO_COPY=com.unity3d.ads:unity-ads:[4.12.0,4.13[" "-PUSE_JETIFIER=0" "-PDATA_BINDING_VERSION=8.10.0"', CurrentDirectory='E:\game project\spaceFighterMobile\Temp\PlayServicesResolverGradle', Native error= The system cannot find the file specified.

System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) (at <5e2bc8b0debf4c32b237d934ecdb2e0e>:0)
System.Diagnostics.Process.Start () (at <5e2bc8b0debf4c32b237d934ecdb2e0e>:0)
(wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
GooglePlayServices.CommandLine.RunViaShell (System.String toolPath, System.String arguments, System.String workingDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] envVars, GooglePlayServices.CommandLine+IOHandler ioHandler, System.Boolean useShellExecution, System.Boolean stdoutRedirectionInShellMode) (at <6107d0e161ea44f5b1a06a3cb63d4bc0>:0)
GooglePlayServices.CommandLine.Run (System.String toolPath, System.String arguments, System.String workingDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] envVars, GooglePlayServices.CommandLine+IOHandler ioHandler) (at <6107d0e161ea44f5b1a06a3cb63d4bc0>:0)
GooglePlayServices.CommandLine+<RunAsync>c__AnonStorey0.<>m__1 () (at <6107d0e161ea44f5b1a06a3cb63d4bc0>:0)
System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) (at <b58ae05d85d94491b6b3e173807d3a54>:0)
System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <b58ae05d85d94491b6b3e173807d3a54>:0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <b58ae05d85d94491b6b3e173807d3a54>:0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) (at <b58ae05d85d94491b6b3e173807d3a54>:0)
System.Threading.ThreadHelper.ThreadStart () (at <b58ae05d85d94491b6b3e173807d3a54>:0)
UnityEngine.<>c:<RegisterUECatcher>b__0_0(Object, UnhandledExceptionEventArgs)

i have tried using unity 6000.1.1f1 , 6000.2.8.f1 and 6000.4.0a2 but all gave me the same results.

i also tried deleting the library folder and letting unity regenerate it but it also didn't seem to work.

5
  • 1
    Try building your project or an empty project for Android and see if it works, sometimes this happens but builds still succeed. If not, you'll see a more detailed error. Commented Oct 24 at 0:03
  • @DarkDuck in a empty project building works and there is no error. but i cant get it working in my original project. Commented Oct 24 at 8:34
  • Does any particular error appear in your console? (when you build your original project) Commented Oct 26 at 8:25
  • check the question i gave the console error. Commented Oct 27 at 12:41
  • I can confirm that this very same issue, along with an error saying "jar is not found in system path" is happening after I updated my unity version due to security update (it could also be something else I did, but this is the most significant one I remember) I am still working on it; I will update you once I find the solution. Commented Oct 30 at 1:44

1 Answer 1

1

I made a lot of different changes until I was finally able to

build for android again. I will list them below, following these I hope you can solve your problem as well.

0- Make sure to create a backup of your entire project, we'll be deleting a ton of stuff.

1- Inside your Project folder, delete the Library and Temp folders. Temp folder is only visible when the editor is running.

2- There seems to be something wrong with package resolution. the default one tries to run a bat file that does not exist. One way is to create or download it yourself but I did that with no luck. The progress was still stuck on 0% but this time with no errors. instead, Install unity jar resolver (Github: https://github.com/googlesamples/unity-jar-resolver) I installed it using GIT from package manager (https://github.com/googlesamples/unity-jar-resolver?tab=readme-ov-file#install-via-git-url)

3- I got hundreds of errors in my console after the previous step. what you want to do now is to delete the folder called "MobileDependencyResolver" from your Assets folder. You'll be shown a messagebox about re-importing it, click yes and let it process everything.

4- Now you'll have a new option in the Assets menu (top bar in unity editor) called External Dependency Manager. Assets > External Dependency Manager > Android Resolver > Force Resolve

Click force resolve once, then try to build for android again.

Notes:
in the process I also deleted .gradle and .android folders from my user folder (C:\Users\<username>) but I don't think it affected the outcome.

Other useful links:
https://discussions.unity.com/t/win32exception-at-resolving-android-dependencies-cannot-find-file-gradlew-bat/904380

Sign up to request clarification or add additional context in comments.

1 Comment

skipping step 1 also works

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.