Search Unity

Other Just can't build for android playstore anymore (.aab)

Discussion in 'Android' started by TEKNOJIHAD, Mar 19, 2023.

  1. TEKNOJIHAD

    TEKNOJIHAD

    Joined:
    Dec 24, 2019
    Posts:
    1
    Hello,

    I've been working on my project for 3 years now, it is an android game which is gonna be released on the playstore, the game is almost fully finished, it is fully polished, playable and complete, I only need to finish the ads and a button to remove ads.

    At first I would get alot of errors because of Admob package and the In App Purchase package so I did all kinds of workarounds to build the .aab file, (changed gradle settings files and versions and alot more stuff).

    At the time when I started this project, I had no idea the playstore had a limit of 150mb per app, My .aab file was almost 600mb so the upload of the .aab file would always give me an error, I figured out this limit could be "ignored" if I used the "Play Asset Delivery".

    I added the package and now I can't build the .aab file even on backup projects, I get 243 errors when building.

    I already tried:

    - Opening and updating the project to 2020.1.3f1 (I am currently attempting to build on 2019.4.1f1).
    - Going back to a project backup of 2019.4.1f1 (when the .aab file was buildable, and the project did not have "Play Asset Delivery" Package).
    - Deleting the library folder of the project.
    - Restoring/Adding back various older projects (1 hour of loading everytime).

    I have been trying to fix these errors for hours now and no success, I am not finding anything on google related to these errors,

    At this point if I could revert back to when I could build the .aab file I would be happy (btw building an .aab file on an empty android project works).

    I will attempt to resize all the texture and diminish all audio files qualities to get below the 150mb limit,

    Here is the start of the list of errors I get when building: (there are over 200).

    Code (CSharp):
    1. An exception has occurred in the compiler (1.8.0-adoptopenjdk). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
    2.  
    3. java.lang.AssertionError: annotationType(): unrecognized Attribute name MODULE (class com.sun.tools.javac.util.UnsharedNameTable$NameImpl)
    4.  
    5.     at com.sun.tools.javac.util.Assert.error(Assert.java:133)
    6.  
    7.     at com.sun.tools.javac.code.TypeAnnotations.annotationType(TypeAnnotations.java:231)
    8.  
    9.     at com.sun.tools.javac.code.TypeAnnotations$TypeAnnotationPositions.separateAnnotationsKinds(TypeAnnotations.java:294)
    10.  
    11.     at com.sun.tools.javac.code.TypeAnnotations$TypeAnnotationPositions.visitVarDef(TypeAnnotations.java:1164)
    12.  
    13.     at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:852)
    14.  
    15.     at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
    16.  
    17.     at com.sun.tools.javac.code.TypeAnnotations$TypeAnnotationPositions.scan(TypeAnnotations.java:275)
    18.  
    19.     at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
    20.  
    21.  
    Does anyone know what I should do?

    Edit: Fixed by adding a backup project again in Unity Hub and running it with unity 2019, unticking all special templates in Player Settings->Publishing settings, and using default/recommended SDK/NDK/Gradle in Edit->Preferences->External tools, after that I downloaded installed unity 2021.3.15f1 and android modules and opened the backup project on that version, no build errors (I'm not sure using a backup and opening in 2019 was necessary).
     
    Last edited: Mar 20, 2023