Resolving Android dependencies fails

Every time I try to resolve the android dependencies it fails with this error

203188-screenshot-2022-12-23-031043.png

**Win32Exception: ApplicationName='C:\Users\user\Unity\Projects\SweetSugar\SweetSugar\Temp\PlayServicesResolverGradle\gradlew.bat', CommandLine='--no-daemon -b "C:\Users\user\Unity\Projects\SweetSugar\SweetSugar\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=C:/Program Files/Unity/Hub/Editor/2021.3.14f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK" "-PTARGET_DIR=C:\Users\user\Unity\Projects\SweetSugar\SweetSugar\Assets\Plugins\Android" "-PMAVEN_REPOS=https://android-sdk.is.com/;https://maven.google.com/" "-PPACKAGES_TO_COPY=com.yandex.android:mobmetricalib:5.2.0;com.ironsource.sdk:mediationsdk:7.2.6;com.google.android.gms:play-services-ads-identifier:18.0.1;com.google.android.gms:play-services-basement:18.1.0" "-PUSE_JETIFIER=0" "-PDATA_BINDING_VERSION=4.0.1"', CurrentDirectory='C:\Users\user\Unity\Projects\SweetSugar\SweetSugar\Temp\PlayServicesResolverGradle', Native error= The system cannot find the file specified.
System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) (at <b33672c2670a41d3b6cd2c30c98a2bed>:0)
System.Diagnostics.Process.Start () (at <b33672c2670a41d3b6cd2c30c98a2bed>: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 <d6232873609549b8a045fa15811a5bd3>:0)
System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <d6232873609549b8a045fa15811a5bd3>:0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <d6232873609549b8a045fa15811a5bd3>:0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) (at <d6232873609549b8a045fa15811a5bd3>:0)
System.Threading.ThreadHelper.ThreadStart () (at <d6232873609549b8a045fa15811a5bd3>:0)
UnityEngine.<>c:<RegisterUECatcher>b__0_0(Object, UnhandledExceptionEventArgs)**

3 Answers

3

Check the boxes[204402-снимок.jpg|204402]

Don’t forget to resolve dependecies.

You may face with other problem after that. It is about android.enableR8.
You may help this post: unity game engine - The option 'android.enableR8' is deprecated and should not be used anymore. It will be removed in a future version of the Android Gradle - Stack Overflow

And finally if you face with problem about AndroidX
You need to enable jetifier in resolver settings, and add to your Plugins/Android/gradleTemplate.properties this line:
android.useAndroidX=true

The work with integration SDK is just a dancing with tambourine.

Thanks for this, I'm trying to publish my first unity game in google play and its been a pain in the ass, bug after bug, the whole process is just so annoying. This solved this issue for now. Looking forward to the next bug :D.

I got the same error. Can anyone help me pls?

I am getting this error!

Tried creating a new project untiy 2020.3.42f

Added package “Ads Mediation” 1.0.0

Added scene “IronSourceDemo” to build

Switched to build Android

And this error occurred.

Please, help!!