Several issues with unity

When I load Unity I’m now getting the following issue

8935548--1225275--upload_2023-4-8_9-29-58.png

I have uninstalled/reinstalled unity, I’ve installed the specific version of java that the external tools says its looking for and directed it to that location and still getting this issue when I load unity (2022.2.14f1 & 2021.3.22f1)

Also have the following messages show up in the console when opening my project (after closing the previously mentioned dialogue box twice)

Assets\IronSource\DemoScene\IronSourceDemoScript.cs(99,9): warning CS0618: ‘IronSourceEvents.onImpressionSuccessEvent’ is obsolete: ‘This method has been deprecated and won’t be included in ironSource SDK versions 7.3.0 and above. Please use OnImpressionDataReady instead.’

using code to prevent emojis

Failed with exception GooglePlayServices.JavaUtilities+ToolNotFoundException: jar not found.
  at GooglePlayServices.JavaUtilities.FindJavaTool (System.String javaTool) [0x0009a] in <6107d0e161ea44f5b1a06a3cb63d4bc0>:0 
  at GooglePlayServices.JavaUtilities.get_JarBinaryPath () [0x00000] in <6107d0e161ea44f5b1a06a3cb63d4bc0>:0 
  at GooglePlayServices.PlayServicesResolver.ExtractZip (System.String zipFile, System.Collections.Generic.IEnumerable`1[T] extractFilenames, System.String outputDirectory, System.Boolean update) [0x000cb] in <6107d0e161ea44f5b1a06a3cb63d4bc0>:0 
UnityEngine.Debug:Log (object)
Google.Logger:Log (string,Google.LogLevel)
GooglePlayServices.PlayServicesResolver:Log (string,Google.LogLevel)
GooglePlayServices.PlayServicesResolver:ExtractZip (string,System.Collections.Generic.IEnumerable`1<string>,string,bool)
Google.GradleWrapper:Extract (Google.Logger)
GooglePlayServices.GradleResolver:GradleResolution (string,string,bool,bool,System.Action`1<System.Collections.Generic.List`1<Google.JarResolver.Dependency>>)
GooglePlayServices.GradleResolver:smile:oResolutionUnsafe (string,bool,System.Action)
GooglePlayServices.GradleResolver/<DoResolution>c__AnonStorey13:<>m__1D ()
Google.RunOnMainThread:ExecuteNext ()
Google.RunOnMainThread:<ExecuteAll>m__A ()
Google.RunOnMainThread:RunAction (System.Action)
Google.RunOnMainThread:ExecuteAll ()
Google.RunOnMainThread:Run (System.Action,bool)
GooglePlayServices.GradleResolver:smile:oResolution (string,bool,System.Action)
GooglePlayServices.PlayServicesResolver:ResolveUnsafe (System.Action`1<bool>,bool,bool,bool)
GooglePlayServices.PlayServicesResolver/<ScheduleResolve>c__AnonStorey1E:<>m__3F ()
GooglePlayServices.PlayServicesResolver:ExecuteNextResolveJob ()
GooglePlayServices.PlayServicesResolver:ScheduleResolve (bool,bool,System.Action`1<bool>,bool)
GooglePlayServices.PlayServicesResolver:AutoResolve (System.Action)
GooglePlayServices.PlayServicesResolver:<ScheduleAutoResolve>m__47 ()
Google.RunOnMainThread:ExecutePollingJobs ()
Google.RunOnMainThread:<ExecuteAll>m__A ()
Google.RunOnMainThread:RunAction (System.Action)
Google.RunOnMainThread:ExecuteAll ()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()

And

Job failed with exception: GooglePlayServices.JavaUtilities+ToolNotFoundException: jar not found.
  at GooglePlayServices.PlayServicesResolver.ExtractZip (System.String zipFile, System.Collections.Generic.IEnumerable`1[T] extractFilenames, System.String outputDirectory, System.Boolean update) [0x00130] in <6107d0e161ea44f5b1a06a3cb63d4bc0>:0 
  at Google.GradleWrapper.Extract (Google.Logger logger) [0x00045] in <6107d0e161ea44f5b1a06a3cb63d4bc0>:0 
  at GooglePlayServices.GradleResolver.GradleResolution (System.String destinationDirectory, System.String androidSdkPath, System.Boolean logErrorOnMissingArtifacts, System.Boolean closeWindowOnCompletion, System.Action`1[T] resolutionComplete) [0x00085] in <6107d0e161ea44f5b1a06a3cb63d4bc0>:0 
  at GooglePlayServices.GradleResolver.DoResolutionUnsafe (System.String destinationDirectory, System.Boolean closeWindowOnCompletion, System.Action resolutionComplete) [0x000ba] in <6107d0e161ea44f5b1a06a3cb63d4bc0>:0 
  at GooglePlayServices.GradleResolver+<DoResolution>c__AnonStorey13.<>m__1D () [0x00000] in <6107d0e161ea44f5b1a06a3cb63d4bc0>:0 
  at Google.RunOnMainThread.ExecuteNext () [0x0003d] in <bc484ae24804425b9f40a568d4bcd71d>:0 
UnityEngine.Debug:LogError (object)
Google.RunOnMainThread:ExecuteNext ()
Google.RunOnMainThread:<ExecuteAll>m__A ()
Google.RunOnMainThread:RunAction (System.Action)
Google.RunOnMainThread:ExecuteAll ()
Google.RunOnMainThread:Run (System.Action,bool)
GooglePlayServices.GradleResolver:smile:oResolution (string,bool,System.Action)
GooglePlayServices.PlayServicesResolver:ResolveUnsafe (System.Action`1<bool>,bool,bool,bool)
GooglePlayServices.PlayServicesResolver/<ScheduleResolve>c__AnonStorey1E:<>m__3F ()
GooglePlayServices.PlayServicesResolver:ExecuteNextResolveJob ()
GooglePlayServices.PlayServicesResolver:ScheduleResolve (bool,bool,System.Action`1<bool>,bool)
GooglePlayServices.PlayServicesResolver:AutoResolve (System.Action)
GooglePlayServices.PlayServicesResolver:<ScheduleAutoResolve>m__47 ()
Google.RunOnMainThread:ExecutePollingJobs ()
Google.RunOnMainThread:<ExecuteAll>m__A ()
Google.RunOnMainThread:RunAction (System.Action)
Google.RunOnMainThread:ExecuteAll ()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()

And my final issue which is probably related to the above issues is when I try to build my game it gets stuck.
8935548--1225281--upload_2023-4-8_9-52-31.png

As you can see I let this sit for 7 1/2 hours and it didn’t move. It was at this point within a minutes time at most.

This might help for the ironsource noise:

Extra unwanted packages in new projects (collab, testing, rider and other junk):

About the fastest way I have found to make a project and avoid all this noise is to create the project, then as soon as you see the files appear, FORCE-STOP (hard-kill) Unity (with the Activity Manager or Task Manager), then go hand-edit the Packages/manifest.json file as outlined in the above post, then reopen Unity.

Sometimes the package system gets borked from all this unnecessary churn and requires the package cache to be cleared:

More generally…

How to troubleshoot build failures:

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 third-party libraries such as Firebase.

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:

Recently (circa July 2022) there 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:

Android Gradle errors and other related stuff:

1 Like

Sorry for the late reply, I started a new project and it opened just fine, so then I imported everything from my project into thi9s one and it’s been working just fine every since then. And has allowed me to build the game as well.

1 Like

This is my light at the end of a tunnel rn. Much appreciated

1 Like