Android dependency issues (again)

The most infuriating thing about making Android builds is how one day it will work, then another day it will stop working. The whole dependencies thing is a strange mystery to me, and I don’t understand why it wants to constantly update things that were already working, proceeding to break things.

Now I can’t build for Android, and all I get is “Gradle failed to fetch dependencies.” (with a ton of other info that I don’t understand), and “Unable to determine which Android packages are installed.” with more info that I don’t understand.

I’ve tried changing android JDK and SDK settings, checking & unchecking boxes in both the Unity preferences and the External Dependency Manger’s Android settings (based on other threads I’ve seen). Nothing is helping.

How does the Android build situation get so messed up when it was working before? Do I need to reinstall something? How do I avoid this from happening in the future?

Unity: 2021.2.16f1 (Mac Silicon version)
Minimum API level: 23
Target API level: 30

I finally resorted to rebooting my PC. Go figure… it worked.

Glad you figured it out!
Just a note : Make sure you set Target API as at-least 31, as its a requirement to publish on Google Play.

Is 31 a new requirement? I’ve submitted with 30 for several months now.

[edit] https://developer.android.com/google/play/requirements/target-sdk
31 isn’t required until November of this year.

Yea, you are right. Android 11 + API 30 is the requirment last November.
But, due to latest androidx core libs (used by many plugins) mostly need API 31, its nearly a requirment. However, as you mentioned as long as you don’t need API 31, you are good to go with API 30 until for next 4-5 months.