I'm trying to build my app, but I keep getting the same error:
JAVA_HOME environment references a directory (C:/Program Files/Unity/Hub/Editor/2021.3.24f1/Editor/Data/PlaybackEngines/AndroidPlayer/OpenJDK) that does not contain jar which is required to process Android libraries.
The folder 'C:/Program Files/Unity/Hub/Editor/2021.3.24f1/Editor/Data/PlaybackEngines/AndroidPlayer/OpenJDK' does not exist, as I don't have that version downloaded. I am on 6000.1.13f1. In the preferences I have the JDK, SDK, NDK and gradle all pointed to the 6000 folder. The environment variables used to point to 2021.3.23f1 (which I also didn't have anymore), but after changing them to 6000 nothing changed. I tried android resolve, force android resolve, and reinstall the whole editor in the unity hub along with reinstalling the android packages. Nothing seems to fix this error. Opening the unity folder in vscode and searching specifically for '2021.3.24f1' doesn't give me any results either.
I am completely lost in this. I can't build anything or patch them to my phone. Everytime I try, Unity crashes.
Would anyone know how to fix this?