Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Shrinker (R8)

Discussion in 'Editor & General Support' started by mahmoud93p, Jul 14, 2019.

  1. mahmoud93p

    mahmoud93p

    Joined:
    Feb 11, 2015
    Posts:
    31
    Hello,

    i have some issue with unity 2019.1.10f1 -Tried NDK R16 and R20

    the error say you must to disable : android.enableR8=false
    and i don't know how can i turn off in unity !!

    the full error
    Code (CSharp):
    1. CommandInvokationFailure: Gradle build failed.
    2. /Applications/Unity/Hub/Editor/2019.1.10f1/PlaybackEngines/AndroidPlayer/Tools/OpenJDK/MacOS/bin/java -classpath "/Applications/Unity/Hub/Editor/2019.1.10f1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
    3.  
    4. stderr[
    5. D8: Program type already present: com.stansassets.androidnative.BuildConfig
    6.  
    7. FAILURE: Build failed with an exception.
    8.  
    9. * What went wrong:
    10. Execution failed for task ':transformClassesAndResourcesWithR8ForRelease'.
    11. > com.android.tools.r8.CompilationFailedException: Compilation failed to complete
    12.  
    13. * Try:
    14. 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.
    15.  
    16. * Get more help at https://help.gradle.org
    17.  
    18. BUILD FAILED in 36s
    19. ]
    20. stdout[
    21. > Task :preBuild UP-TO-DATE
    22. > Task :extractProguardFiles
    23. > Task :AN_Res:preBuild UP-TO-DATE
    24. > Task :AN_Res:preReleaseBuild UP-TO-DATE
    25. > Task :AN_Res:checkReleaseManifest
    26. > Task :AN_Res:processReleaseManifest
    27. > Task :Firebase:preBuild UP-TO-DATE
    28. > Task :Firebase:preReleaseBuild UP-TO-DATE
    29. > Task :Firebase:checkReleaseManifest
    30. > Task :Firebase:processReleaseManifest
    31. > Task :GoogleMobileAdsPlugin:preBuild UP-TO-DATE
    32. > Task :GoogleMobileAdsPlugin:preReleaseBuild UP-TO-DATE
    33. > Task :GoogleMobileAdsPlugin:checkReleaseManifest
    34. > Task :GoogleMobileAdsPlugin:processReleaseManifest
    35. > Task :preReleaseBuild
    36. > Task :AN_Res:compileReleaseAidl NO-SOURCE
    37. > Task :Firebase:compileReleaseAidl NO-SOURCE
    38. > Task :GoogleMobileAdsPlugin:compileReleaseAidl NO-SOURCE
    39. > Task :compileReleaseAidl NO-SOURCE
    40. > Task :AN_Res:packageReleaseRenderscript NO-SOURCE
    41. > Task :Firebase:packageReleaseRenderscript NO-SOURCE
    42. > Task :GoogleMobileAdsPlugin:packageReleaseRenderscript NO-SOURCE
    43. > Task :compileReleaseRenderscript NO-SOURCE
    44. > Task :checkReleaseManifest
    45. > Task :generateReleaseBuildConfig
    46. > Task :prepareLintJar
    47. > Task :generateReleaseSources
    48. > Task :AN_Res:compileReleaseRenderscript NO-SOURCE
    49. > Task :AN_Res:generateReleaseBuildConfig
    50. > Task :AN_Res:generateReleaseResValues
    51. > Task :AN_Res:generateReleaseResources
    52. > Task :AN_Res:packageReleaseResources
    53. > Task :AN_Res:generateReleaseRFile
    54. > Task :AN_Res:prepareLintJar
    55. > Task :AN_Res:generateReleaseSources
    56. > Task :AN_Res:javaPreCompileRelease
    57. > Task :AN_Res:compileReleaseJavaWithJavac
    58. > Task :AN_Res:bundleLibCompileRelease
    59. > Task :Firebase:compileReleaseRenderscript NO-SOURCE
    60. > Task :Firebase:generateReleaseBuildConfig
    61. > Task :Firebase:generateReleaseResValues
    62. > Task :Firebase:generateReleaseResources
    63. > Task :Firebase:packageReleaseResources
    64. > Task :Firebase:generateReleaseRFile
    65. > Task :Firebase:prepareLintJar
    66. > Task :Firebase:generateReleaseSources
    67. > Task :Firebase:javaPreCompileRelease
    68. > Task :Firebase:compileReleaseJavaWithJavac
    69. > Task :Firebase:bundleLibCompileRelease
    70. > Task :GoogleMobileAdsPlugin:compileReleaseRenderscript NO-SOURCE
    71. > Task :GoogleMobileAdsPlugin:generateReleaseBuildConfig
    72. > Task :GoogleMobileAdsPlugin:generateReleaseResValues
    73. > Task :GoogleMobileAdsPlugin:generateReleaseResources
    74. > Task :GoogleMobileAdsPlugin:packageReleaseResources
    75. > Task :GoogleMobileAdsPlugin:generateReleaseRFile
    76. > Task :GoogleMobileAdsPlugin:prepareLintJar
    77. > Task :GoogleMobileAdsPlugin:generateReleaseSources
    78. > Task :GoogleMobileAdsPlugin:javaPreCompileRelease
    79. > Task :GoogleMobileAdsPlugin:compileReleaseJavaWithJavac
    80. > Task :GoogleMobileAdsPlugin:bundleLibCompileRelease
    81. > Task :javaPreCompileRelease
    82. > Task :mainApkListPersistenceRelease
    83. > Task :generateReleaseResValues
    84. > Task :generateReleaseResources
    85. > Task :mergeReleaseResources
    86. > Task :createReleaseCompatibleScreenManifests
    87. > Task :processReleaseManifest
    88. > Task :processReleaseResources
    89. > Task :compileReleaseJavaWithJavac
    90. > Task :compileReleaseSources
    91. > Task :AN_Res:prepareLintJarForPublish
    92. > Task :Firebase:prepareLintJarForPublish
    93. > Task :GoogleMobileAdsPlugin:prepareLintJarForPublish
    94. > Task :lintVitalRelease
    95. > Task :mergeReleaseShaders
    96. > Task :compileReleaseShaders
    97. > Task :generateReleaseAssets
    98. > Task :AN_Res:mergeReleaseShaders
    99. > Task :AN_Res:compileReleaseShaders
    100. > Task :AN_Res:generateReleaseAssets
    101. > Task :AN_Res:packageReleaseAssets
    102. > Task :Firebase:mergeReleaseShaders
    103. > Task :Firebase:compileReleaseShaders
    104. > Task :Firebase:generateReleaseAssets
    105. > Task :Firebase:packageReleaseAssets
    106. > Task :GoogleMobileAdsPlugin:mergeReleaseShaders
    107. > Task :GoogleMobileAdsPlugin:compileReleaseShaders
    108. > Task :GoogleMobileAdsPlugin:generateReleaseAssets
    109. > Task :GoogleMobileAdsPlugin:packageReleaseAssets
    110. > Task :mergeReleaseAssets
    111. > Task :validateSigningRelease
    112. > Task :signingConfigWriterRelease
    113. > Task :processReleaseJavaRes NO-SOURCE
    114. > Task :AN_Res:processReleaseJavaRes NO-SOURCE
    115. > Task :AN_Res:bundleLibResRelease
    116. > Task :Firebase:processReleaseJavaRes NO-SOURCE
    117. > Task :Firebase:bundleLibResRelease
    118. > Task :GoogleMobileAdsPlugin:processReleaseJavaRes NO-SOURCE
    119. > Task :GoogleMobileAdsPlugin:bundleLibResRelease
    120. > Task :transformResourcesWithMergeJavaResForRelease
    121. > Task :AN_Res:bundleLibRuntimeRelease
    122. > Task :AN_Res:mergeReleaseConsumerProguardFiles
    123. > Task :Firebase:bundleLibRuntimeRelease
    124. > Task :Firebase:mergeReleaseConsumerProguardFiles
    125. > Task :GoogleMobileAdsPlugin:bundleLibRuntimeRelease
    126. > Task :GoogleMobileAdsPlugin:mergeReleaseConsumerProguardFiles
    127.  
    128. > Task :transformClassesAndResourcesWithR8ForRelease FAILED
    129. R8 is the new Android code shrinker. If you experience any issues, please file a bug at
    130. https://issuetracker.google.com, using 'Shrinker (R8)' as component name. You can
    131. disable R8 by updating gradle.properties with 'android.enableR8=false'.
    132. Current version is: 1.4.77 (build b74371231cb896b02f83285efb055b7c00ff64d8 from go/r8bot (luci-r8-ci-archive-0-eqqf)).
    133.  
    134.  
    135. Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
    136. Use '--warning-mode all' to show the individual deprecation warnings.
    137. See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
    138. 72 actionable tasks: 72 executed
    139. ]
    140. exit code: 1
    141. UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <1a10f9035b6b403994c99e5b653643c6>:0)
    142. UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <1a10f9035b6b403994c99e5b653643c6>:0)
    143. UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <1a10f9035b6b403994c99e5b653643c6>:0)
    144. UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <1a10f9035b6b403994c99e5b653643c6>:0)
    145. UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <1a10f9035b6b403994c99e5b653643c6>:0)
    146. Rethrow as GradleInvokationException: Gradle build failed
    147. UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <1a10f9035b6b403994c99e5b653643c6>:0)
    148. UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <1a10f9035b6b403994c99e5b653643c6>:0)
    149. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <1a10f9035b6b403994c99e5b653643c6>:0)
    150. Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    151. UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <1a10f9035b6b403994c99e5b653643c6>:0)
    152. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <1a10f9035b6b403994c99e5b653643c6>:0)
    153. 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 <1a10f9035b6b403994c99e5b653643c6>:0)
    154. UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <1a10f9035b6b403994c99e5b653643c6>:0)
    155. 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/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)
    156. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    157.  
    158.  
     
  2. Sergio26Diaz

    Sergio26Diaz

    Joined:
    Apr 25, 2019
    Posts:
    1
    have you found the solution please help
     
  3. RRR888

    RRR888

    Joined:
    Jul 15, 2019
    Posts:
    1
    please help+