Search Unity

Bug CS0103: Gradle does not exist in current context

Discussion in 'Editor & General Support' started by cofycharm, Apr 17, 2023.

  1. cofycharm

    cofycharm

    Joined:
    Feb 6, 2022
    Posts:
    3
    Not sure what to do, I just created a new project after reinstalling Unity Hub and editor. Currently using 2021.3.22f1 (LTS), and I have tried multiple methods. Any idea why this is happening, and how can I solve it?

    Thanks.
     

    Attached Files:

  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,695
    Extra unwanted packages in new projects (collab, testing, rider and other junk):

    https://forum.unity.com/threads/temp-unityengine-testrunner-dll-error.1133938/#post-7287748

    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:

    https://stackoverflow.com/questions/53145919/unity3d-package-cache-errors/69779122
     
  3. cofycharm

    cofycharm

    Joined:
    Feb 6, 2022
    Posts:
    3

    Sorry, these methods don't seem to work. The error message is shown once I start up my project, without me even trying to compile the game in the first place. It seems to be an error that is specific to Gradle. Can I check if there are any other possible causes of the problems?