0

Whenever I try to build my game for android, i get the following errors

Starting a Gradle Daemon, 1 incompatible and 6 stopped Daemons could not be reused, use --status for details

Configure project :launcher WARNING:The option setting 'android.bundle.enableUncompressedNativeLibs=false' is deprecated.

Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 Note: C:\Users\geole\OneDrive\Desktop\Unity\Radius\Library\Bee\Android\Prj\Mono2x\Gradle\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.

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

Also, when the build fails, it gives me the message "A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction See the Console for details."

In this project I attempted to use Unity Levelplay and Ironsource ads, and because Unity is a crap company I had to literally modify some temp files and the gradle properties. I have since switched to Unity Advertisement Legacy and have removed the Ads Mediation package. The temp files are now gone and the gradle properties changes have been reverted, but something here may still have messed it up

Anyone have any ideas?

Screenshot of console output for errors

As stated, I reverted the changes I had made and switched from ironsource and ads mediation to unity ads legacy

3
  • Open the editor.log file and search for stderr. That will show you the actual error. Commented Dec 6, 2023 at 5:31
  • this is gradle error usually occurs when files conflict. try to Force Resolve by going in Assets -> External dependency Manager-> Android Resolver -> Force Resolve. then, Assets -> External dependency Manager-> Android Resolver -> delete resolver libraries and then build. if its not gonna work close the project delete the library folder and open the project. Commented Dec 7, 2023 at 10:42
  • I think you added Android support after Unity installation. Remove Unity and reinstall it. Adding Android support is really hard, I tried it before and I can't solve it. Commented Dec 21, 2023 at 6:23

1 Answer 1

0

Once I had this error when I forgot to add package name. But Gradle errors usually could have a wide range of reasons - from silly mistakes like mine to wrongly configured packages. Modifying gradle properties is quite bad idea. Try to remind at which point you had successful builds

Sign up to request clarification or add additional context in comments.

1 Comment

This should be better a comment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.