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

com.unity.services.push-notifications build fail

Discussion in 'Editor & General Support' started by Carwoman, Jun 14, 2023.

  1. Carwoman

    Carwoman

    Joined:
    Nov 25, 2020
    Posts:
    6
    I'm currently working with Unity 2021.3.18f1, and I'm facing an issue when attempting to include the "com.unity.services.push-notifications" package in my project. Consequently, I'm unable to create a build. I'm curious if anyone else has encountered the same problem.

    I've already tried a couple of potential solutions, such as changing the Unity project version to Unity 2022 (LTS) and modifying the proguard file by adding the line: "-keep class com.unity.services.pushnotifications** { *;}". However, these attempts have not resolved the issue.
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    3,899
    With what error message? Building for which platform?

    There is a near limitless potential for any complex software to fail, thus it's very important to be precise in specifying how it fails. Otherwise it's like stabbing in the dark.
     
  3. Carwoman

    Carwoman

    Joined:
    Nov 25, 2020
    Posts:
    6
    Hi,

    Platform is Android
     
  4. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,725
    And the error message?
     
  5. Carwoman

    Carwoman

    Joined:
    Nov 25, 2020
    Posts:
    6
    Some parts from error message are:

    CommandInvokationFailure: Gradle build failed.
    Task :unityLibrary:compileReleaseJavaWithJavac
    The option 'android.enableR8' is deprecated and should not be used anymore. It will be removed in a future version of the Android Gradle


    The same error happens here: https://forum.unity.com/threads/cannot-build-project-with-push-notifications-added.1330671/

    It seems that Push Notification doesn't work.
     
  6. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,725
  7. TylerJay-B

    TylerJay-B

    Joined:
    Dec 29, 2018
    Posts:
    17
    I'm getting a very similar issue I think, unfortunately I'm unable to revert my target sdk to 30 from 31 as I have other things that depend on that version. Is there any other alternative solution?

    * What went wrong:
    Execution failed for task ':unityLibrary:compileReleaseJavaWithJavac'.
    > Compilation failed; see the compiler error output for details.