Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by gorbatchevartsem · Aug 03, 2021 at 12:29 PM · integration

Problems with Gradle in Unity

When I build Unity project on Android, a number of errors pop up.


Errors:
1. First error

 > Configure project :launcher
 ============================================================================
 AppLovin Quality Service Plug-in for Gradle and Android Studio Version 3.9.9
 Copyright (c) 2021 AppLovin Ltd. All rights reserved.
 ============================================================================
 [SafeDK] Your project has been updated to support Multi-Dex!
 With Multi-Dex support you can use as many methods as you like in your application (no 65K method limit)
 
 > Task :launcher:preBuild UP-TO-DATE
 > Task :unityLibrary:MaxMediationGoogle.androidlib:preBuild UP-TO-DATE
 > Task :unityLibrary:preBuild UP-TO-DATE
 > Task :unityLibrary:MaxMediationGoogle.androidlib:preReleaseBuild UP-TO-DATE
 > Task :unityLibrary:preReleaseBuild UP-TO-DATE
 > Task :unityLibrary:MaxMediationGoogle.androidlib:compileReleaseAidl NO-SOURCE
 > Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
 > Task :launcher:prepareLintJar UP-TO-DATE
 > Task :unityLibrary:MaxMediationGoogle.androidlib:packageReleaseRenderscript NO-SOURCE
 > Task :unityLibrary:compileReleaseAidl NO-SOURCE
 > Task :unityLibrary:generateReleaseResValues UP-TO-DATE
 > Task :unityLibrary:prepareLintJar UP-TO-DATE
 > Task :unityLibrary:prepareLintJarForPublish UP-TO-DATE
 > Task :unityLibrary:mergeReleaseShaders UP-TO-DATE
 > Task :unityLibrary:MaxMediationGoogle.androidlib:generateReleaseResValues
 > Task :unityLibrary:compileReleaseShaders FAILED
 > Task :unityLibrary:MaxMediationGoogle.androidlib:prepareLintJar UP-TO-DATE
 
 Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
 
 You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
 
 See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings
 8 actionable tasks: 2 executed, 6 up-to-date
 
 UnityEngine.GUIUtility:ProcessEvent (int,intptr) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)


2. Second error

 Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
 
 FAILURE: Build failed with an exception.
 
 * What went wrong:
 A problem was found with the configuration of task ':unityLibrary:compileReleaseShaders' (type 'ShaderCompile').
   - In plugin 'com.android.build.gradle.api.AndroidBasePlugin' type 'com.android.build.gradle.tasks.ShaderCompile' property 'sourceDir' is annotated with @InputFiles but missing a normalization strategy.
     
     Reason: If you don't declare the normalization, outputs can't be re-used between machines or locations on the same machine, therefore caching efficiency drops significantly.
     
     Possible solution: Declare the normalization strategy by annotating the property with either @PathSensitive, @Classpath or @CompileClasspath.
     
     Please refer to https://docs.gradle.org/7.1.1/userguide/validation_problems.html#missing_normalization_annotation for more details about this problem.
 
 * Try:
 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
 
 * Get more help at https://help.gradle.org
 
 BUILD FAILED in 5s
 
 UnityEngine.GUIUtility:ProcessEvent (int,intptr) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)


3. Third error

 CommandInvokationFailure: Gradle build failed. 
 /Users/denis/Desktop/UnityStuff/2019.4.21f1/PlaybackEngines/AndroidPlayer/OpenJDK/bin/java -classpath "/Users/denis/Downloads/gradle-7.1.1/lib/gradle-launcher-7.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
 
 stderr[
 Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
 
 FAILURE: Build failed with an exception.
 
 * What went wrong:
 A problem was found with the configuration of task ':unityLibrary:compileReleaseShaders' (type 'ShaderCompile').
   - In plugin 'com.android.build.gradle.api.AndroidBasePlugin' type 'com.android.build.gradle.tasks.ShaderCompile' property 'sourceDir' is annotated with @InputFiles but missing a normalization strategy.
     
     Reason: If you don't declare the normalization, outputs can't be re-used between machines or locations on the same machine, therefore caching efficiency drops significantly.
     
     Possible solution: Declare the normalization strategy by annotating the property with either @PathSensitive, @Classpath or @CompileClasspath.
     
     Please refer to https://docs.gradle.org/7.1.1/userguide/validation_problems.html#missing_normalization_annotation for more details about this problem.
 
 * Try:
 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
 
 * Get more help at https://help.gradle.org
 
 BUILD FAILED in 5s
 ]
 stdout[
 
 > Configure project :launcher
 ============================================================================
 AppLovin Quality Service Plug-in for Gradle and Android Studio Version 3.9.9
 Copyright (c) 2021 AppLovin Ltd. All rights reserved.
 ============================================================================
 [SafeDK] Your project has been updated to support Multi-Dex!
 With Multi-Dex support you can use as many methods as you like in your application (no 65K method limit)
 
 > Task :launcher:preBuild UP-TO-DATE
 > Task :unityLibrary:MaxMediationGoogle.androidlib:preBuild UP-TO-DATE
 > Task :unityLibrary:preBuild UP-TO-DATE
 > Task :unityLibrary:MaxMediationGoogle.androidlib:preReleaseBuild UP-TO-DATE
 > Task :unityLibrary:preReleaseBuild UP-TO-DATE
 > Task :unityLibrary:MaxMediationGoogle.androidlib:compileReleaseAidl NO-SOURCE
 > Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
 > Task :launcher:prepareLintJar UP-TO-DATE
 > Task :unityLibrary:MaxMediationGoogle.androidlib:packageReleaseRenderscript NO-SOURCE
 > Task :unityLibrary:compileReleaseAidl NO-SOURCE
 > Task :unityLibrary:generateReleaseResValues UP-TO-DATE
 > Task :unityLibrary:prepareLintJar UP-TO-DATE
 > Task :unityLibrary:prepareLintJarForPublish UP-TO-DATE
 > Task :unityLibrary:mergeReleaseShaders UP-TO-DATE
 > Task :unityLibrary:MaxMediationGoogle.androidlib:generateReleaseResValues
 > Task :unityLibrary:compileReleaseShaders FAILED
 > Task :unityLibrary:MaxMediationGoogle.androidlib:prepareLintJar UP-TO-DATE
 
 Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
 
 You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
 
 See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings
 8 actionable tasks: 2 executed, 6 up-to-date
 ]
 exit code: 1
 UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
 UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
 UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
 UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
 UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
 Rethrow as GradleInvokationException: Gradle build failed
 UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
 UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
 UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
 Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
 UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
 UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
 UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
 UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <d76da2c9a45b4b02b93f56ae560b1d44>:0)
 UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:353)
 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)


4. And two classic error

 Build completed with a result of 'Failed' in 42 seconds (42439 ms)
 UnityEngine.GUIUtility:ProcessEvent (int,intptr) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)

And

 UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
   at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002b3] in /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:194 
   at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:95 
 UnityEngine.GUIUtility:ProcessEvent (int,intptr) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)


If you have encountered such a problem or know how to solve it, please help. I'll be very grateful


Screenshot: alt text


Thank you for any help

errors.png (86.0 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

122 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Heyzap Integration 1 Answer

How to integrate MobFox with Unity 3D game? 1 Answer

Why my android game crash with chartboost? 0 Answers

Integration of InMobi with HeyZap Mediation 1 Answer

How to Integrate Avatar from unity project with MVC application 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges