Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Target Platform Android Build error

Discussion in 'Editor & General Support' started by flamshot323, Aug 13, 2022.

  1. flamshot323

    flamshot323

    Joined:
    Feb 13, 2020
    Posts:
    4
    • Unity 2022.2.0a14
    • android target platform
    • vulkan graphics api
    • IL2CPP
    • target architecture x86-64
    Build fail in the above unity editor while targeting android platform. Uploaded files include all build errors related to build fail.
     

    Attached Files:

  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,947
    Android build not building:

    Recently (circa July 2022) there have been reports of Unity's installer failing to install the Android Tools.

    https://forum.unity.com/threads/cant-build-for-android.1306098/

    If it's not that, then here's how to troubleshoot:

    First, make a blank project with a single blank scene and prove that it builds successfully.

    If it does NOT build, then go fix your Unity installation, or your other tools, such as Android SDK, NDK, JDK, etc.

    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 that subsystem.
     
    flamshot323 likes this.
  3. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,455
    Next to what kurt said, I want to ask what device are you running on since you selected x86-x64?
    And also worth giving the latest version a shot since this is an alpha and the 2022.2 beta is out
     
    flamshot323 likes this.
  4. flamshot323

    flamshot323

    Joined:
    Feb 13, 2020
    Posts:
    4
    Thank you for this information. I had viewed some similar articles but not that pointed to the android tools issue. I will make sure to follow these steps and let you know how it goes.
     
  5. flamshot323

    flamshot323

    Joined:
    Feb 13, 2020
    Posts:
    4
    The target device is the ML2 headset.
    Hey Kurt, thanks again for your input it appears to have been both issues. The Android tools were not installed properly through the Unity editor so I updated with the correct tools and set the paths for a clean project and it built. I then added in assets from my previous project and it hit similar build error. Currently working through what in the project could be the cause.
     
    DevDunk likes this.