Search Unity

Error on build if I have facebook sdk installed

Discussion in 'Package Manager' started by Tempest74, Sep 2, 2019.

  1. Tempest74

    Tempest74

    Joined:
    May 17, 2017
    Posts:
    133
    When I build my game I get this error: 1 error raised by worker, check the console for details. I am using unity 2019.2 and I experienced this on facebook sdk 17.2 and 16.0
    Code (CSharp):
    1. CommandInvokationFailure: Gradle build failed.
    2. C:/Program Files/Unity/Hub/Editor/2019.2.2f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2019.2.2f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
    3.  
    4. stderr[
    5.  
    6. FAILURE: Build failed with an exception.
    7.  
    8. * What went wrong:
    9. Execution failed for task ':mergeReleaseResources'.
    10. > 1 exception was raised by workers:
    11.   com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed
    12.   C:\Users\Catalin\.gradle\caches\transforms-2\files-2.1\b1a0fce08df19ae1dc4d7860ce2d332c\res\values\values.xml:108:5-6095: AAPT: error: duplicate value for resource 'attr/actionBarSize' with config ''.
    13.      
    14.   C:\Users\Catalin\.gradle\caches\transforms-2\files-2.1\b1a0fce08df19ae1dc4d7860ce2d332c\res\values\values.xml:108:5-6095: AAPT: error: resource previously defined here.
    15.      
    16.   D:\Unity\GitHub\Car game\Temp\gradleOut\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml: error: file failed to compile.
    17.  
    18.  
    19. * Try:
    20. 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.
    21.  
    22. * Get more help at https://help.gradle.org
    23.  
    24. BUILD FAILED in 37s
    25. ]
    26. stdout[
    27.  
    28. > Configure project :
    29. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.2.2f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\28.0.3\package.xml. Probably the SDK is read-only
    30. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.2.2f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    31. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.2.2f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-28\package.xml. Probably the SDK is read-only
    32. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.2.2f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
    33. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.2.2f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\28.0.3\package.xml. Probably the SDK is read-only
    34. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.2.2f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    35. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.2.2f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-28\package.xml. Probably the SDK is read-only
    36. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.2.2f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
    37.  
    38. > Task :preBuild UP-TO-DATE
    39. > Task :preReleaseBuild
    40. > Task :compileReleaseAidl NO-SOURCE
    41. > Task :compileReleaseRenderscript NO-SOURCE
    42. > Task :checkReleaseManifest
    43. > Task :generateReleaseBuildConfig
    44. > Task :prepareLintJar
    45. > Task :generateReleaseSources
    46. > Task :javaPreCompileRelease
    47. > Task :mainApkListPersistenceRelease
    48. > Task :generateReleaseResValues
    49. > Task :generateReleaseResources
    50. > Task :mergeReleaseResources FAILED
    51. 8 actionable tasks: 8 executed
    52. ]
    53. exit code: 1
    54. UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <09a970ae0311447c9749d65ec2409482>:0)
    55. UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <09a970ae0311447c9749d65ec2409482>:0)
    56. UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <09a970ae0311447c9749d65ec2409482>:0)
    57. UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <09a970ae0311447c9749d65ec2409482>:0)
    58. UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <09a970ae0311447c9749d65ec2409482>:0)
    59. Rethrow as GradleInvokationException: Gradle build failed
    60. UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <09a970ae0311447c9749d65ec2409482>:0)
    61. UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <09a970ae0311447c9749d65ec2409482>:0)
    62. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <09a970ae0311447c9749d65ec2409482>:0)
    63. Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    64. UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <09a970ae0311447c9749d65ec2409482>:0)
    65. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <09a970ae0311447c9749d65ec2409482>:0)
    66. 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 <09a970ae0311447c9749d65ec2409482>:0)
    67. UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <09a970ae0311447c9749d65ec2409482>:0)
    68. 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 C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)
    69. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    70.  
    I struggle to solve this for two weeks but no help on any forum
     
  2. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    749
    Hi @Tempest74 ,

    I'm sorry to read you are struggling to get help. Sadly, I won't be of much help too. I don't see how your problem relates to package management.

    Sorry!

    Pascal
     
unityunity