I’m facing build failures on Unity 2022.3.51 for last 5 days.
Following is the reference of the error.
I tried all following, but nothing helped 
-
Changed to Gradle 8.2, 8.10, and 8.11 directories
-
In build,gradle, I used direct path instead of reference.
android {
namespace “com.unity3d.player”
ndkPath “D:/Unity Engine Installs/2022.3.51f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK”
compileSdkVersion 34
buildToolsVersion ‘30.0.3’
3 Deleted entire library and made clean build
-
Re-installed Unity version again.
-
I tried “android-library” vs “com.android.library” in build.gradle.
did it worked before? and if yes, what you did after that, what changes you have applied to the project
creating a default project for android did that build and work on the device?
I did not have GoogleAds earlier. I added this 5 days ago.
Now, despite removing it, I’m not able to make the build.
Sample project worked fine - An APK has been created.
Any further directions on how to solve the problem will be helpful.
I went back to Unity Hub and 22.3.42 with my computer formatted and absolutely nothing. Because I decided I was constantly getting build errors because of the hidden cache. I was successful with the build at first as well. But the error has popped up again. Google is getting hateful.
It’s not a matter of deleting folders and reinstalling editors. I was built up until I installed Firebase. What I suspect right now is automatically upgrading the version of Android-related tools. There must be backend based updates that Google has planted.
FYI, I exported the project to Android Studio and tried building it, but I get the same error again. Android Studio installation doesn’t work.