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

Bug Unity Android Export Tools BUGGED

Discussion in 'Editor & General Support' started by jpjuanpajp, Oct 8, 2023.

  1. jpjuanpajp

    jpjuanpajp

    Joined:
    Jun 8, 2020
    Posts:
    4
    Hi, How are you?
    I am Using the unity 2022.3.91f version for a Mobile Game and i use the Unity Tools to compile the apk
    https://ibb.co/DfyNVyD


    But i have the same 3 errors. I try to install Unity on Another computer and i have the same Bugs:

    Starting a Gradle Daemon, 3 incompatible and 2 stopped Daemons could not be reused, use --status for details
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\32.0.0\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-31\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-32\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\32.0.0\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-31\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-32\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only

    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    C:\Users\juanp\SpaceShooter\Library\Bee\Android\Prj\Mono2x\Gradle\unityLibrary\src\main\java\com\unity\androidnotifications\UnityNotificationManager.java:164: error: cannot find symbol
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
    ^
    symbol: variable TIRAMISU
    location: class VERSION_CODES
    C:\Users\juanp\SpaceShooter\Library\Bee\Android\Prj\Mono2x\Gradle\unityLibrary\src\main\java\com\unity\androidnotifications\UnityNotificationManager.java:165: error: cannot find symbol
    permissionGranted = mContext.checkCallingOrSelfPermission(Manifest.permission.POST_NOTIFICATIONS) == PackageManager.PERMISSION_GRANTED;
    ^
    symbol: variable POST_NOTIFICATIONS
    location: class permission
    Note: C:\Users\juanp\SpaceShooter\Library\Bee\Android\Prj\Mono2x\Gradle\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.


    CommandInvokationFailure: Gradle build failed.
    C:\Program Files\Unity\Hub\Editor\2022.3.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2022.3.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-7.2.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4303m" "assembleRelease"


    What problem is it?
    I play the game with Unity Remote and i dont have any problem.
     

    Attached Files:

  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,713
    How to troubleshoot build failures:

    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.

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

    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...):

    https://forum.unity.com/threads/aab...y-2021-3-8-with-jdk-1-8.1322211/#post-8551193

    Android Gradle errors and other related stuff:

    https://forum.unity.com/threads/unity-gradle-bug-please-help.1368018/#post-8625789
     
  3. jpjuanpajp

    jpjuanpajp

    Joined:
    Jun 8, 2020
    Posts:
    4
    Thanks, is a litle strange, because i dont use external builds and i can export to another platforms wituout problem.
    Maybe the android Unity SDK is broken, because i try with a blank project and i have the same problem.
     
  4. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,637
    Latest Mobile Notifications package required SDK 33 to compile. The simplest solution is to set target sdk to 33 in Player Settings (that is the required API level to publish to Google Play now too).
     
  5. jpjuanpajp

    jpjuanpajp

    Joined:
    Jun 8, 2020
    Posts:
    4
    Problem solved
    Thanks!