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. Dismiss Notice

Question [2023.1] Android builds fail building gradle after project upgrade

Discussion in 'Android' started by PineTreeDev, Aug 11, 2023.

  1. PineTreeDev

    PineTreeDev

    Joined:
    Apr 22, 2019
    Posts:
    31
    We have a large project that is required to move up from 2021 to 2023 because of several issues with addressables and il2cpp builds we were having on android platforms, since we upgraded versions yesterday the team is trying to figure out what is wrong with the old gradle template files we had.

    The documentation on upgrading to 2023 references that, supposedly, old gradle files should work without upgrading to the new api using the Android Project Configuration Manager

    Trying to use Templates Upgrader solves nothing, since it cannot translate our mainTemplate.gradle file, and using it on the other files leaving the mainTemplate behind results in broken code with deprecated calls!

    So the main error right now is that the build fails due to a package name not found in our AndroidManifest and namespace not specified (namespace was the deprecated line of code inside the generated c# Configuration files)

    We are using several firebase packages, all inserted in the new c# configuration file.

    Hopefully someone here can help me figure out what is wrong?
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    Showing the actual error would help, but basically I think you should delete the template (back it up), create new one, and then compare it with backed one, to see the differences.
     
  3. PineTreeDev

    PineTreeDev

    Joined:
    Apr 22, 2019
    Posts:
    31
    Thank you, removing the disabled templates from the project and letting unity regenerate new templates solved the issue, alongside moving a section of the mainTemplate to the settings gradle.

    Now we are having some weird issue with IL2CPP throwing a null reference exception, with a method in one of our internal packages, on some of our machines