I am having troubles getting any of the Unity editors in the 2021.3.2f1 and 2021.3.34f1 series to build to Android because of Androd errors. Even a brand new install with nothing but a sample scene starts its build with the errors shown in the picture.
My coworker tried installing the editor on her computer and building it to her Android phone, and has the same errors. It is a sad day when one has to start a project fighting errors before any data is put into the scene.
Help and Thank you very much for any information I get.
Obviously, if there is actionable data within the errors, fix those problems. Each error entry may have more information than can fit in the console log so select each error and read the expanded view below it.
If that gives you nothing worthwhile (look to Google! You’re never the first one!), then…
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 (edited on August 23, 2023 to include Android SDK 33…):
I will do that. It just seems odd that a project I have built to Android 10 times throughout my 2 year project, suddenly stops building, even with a blank scene. I was hoping for a quick fix lol. I should know by now that very rarely does such a thing happen.
Again, Thank you.
Firstly, confirm that you have the correct Android SDK and JDK versions installed. You can check and set these in Unity via Edit -> Preferences -> External Tools. Ensure the Android Build Support module is installed from Window -> Package Manager -> Unity Registry -> Android Build Support.
Check the API Compatibility Level in Edit -> Project Settings -> Player -> Other Settings and set it to the appropriate version. Examine the Graphics APIs under Edit -> Project Settings -> Player -> Other Settings -> Auto Graphics API and make sure they are configured correctly.
Inspect your AndroidManifest.xml file in Assets/Plugins/Android for any issues with permissions and settings. Verify the Gradle Settings in ProjectName/Assets/Plugins/Android/ProjectSettings.gradle.
If using Unity Hub, consider creating a new project directly from Unity Hub, as creating a new project can sometimes resolve project-specific issues. If problems persist, browse Unity forums for discussions on similar errors and solutions.
As a last resort, consider uninstalling and reinstalling Unity. Don’t forget to back up your projects before doing so. Additionally, check for updates to Unity, as newer versions often include bug fixes and improvements. Provide more specific details about the errors for targeted assistance from the community.
James, I wish everyone was as thoughtful as you are in your help. Tremendous, thank you.
I do not have an Android Build Support and 2) My plugins only have Easy Save3. The picture shares where i am searching for these at. I will start researching how to get these installed and active.
I can make a project in 2022.3.17 , but this leads to ONE, only 1 failure in the project. I would prefer upgrading to that editor but I can not get help I can comprehend in fixing that issue. If you would consider walking me through making an assembly reference that incorporates Opsive.Shared (Assembly definition Asset) and Easy Save 3 (Assembly Definition Asset), I would pay you for your time.