Errors on building android game in Unity

After I added Facebook SDK to my game by following this tutorial

https://api.playfab.com/docs/tutorials/landing-players/facebook-unity

I got lots of error when I try to build the game, what sould I do?

Error:

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

FAILURE: Build failed with an exception.

  • What went wrong:

  • Execution failed for task ‘:mergeReleaseResources’.

1 exception was raised by workers:

com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed

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 ‘’.

C:\Users\Catalin.gradle\caches\transforms-2\files-2.1\b1a0fce08df19ae1dc4d7860ce2d332c\res\values\values.xml:108:5-6095: AAPT: error: resource previously defined here.

D:\Unity\GitHub\Cargame\Temp\gradleOut\build\intermediates\incremental\mergeReleaseResources\merged.dir\values\values.xml: error: file failed to compile.

  • 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 2m 22s

Configure project :

Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.2.0f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\28.0.3\package.xml. Probably the SDK is read-only

Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.2.0f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only

Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.2.0f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-28\package.xml. Probably the SDK is read-only

Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.2.0f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only

Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.2.0f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\28.0.3\package.xml. Probably the SDK is read-only

Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.2.0f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only

Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.2.0f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-28\package.xml. Probably the SDK is read-only

Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.2.0f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only

Task :preBuild UP-TO-DATE

Task :preReleaseBuild

Task :compileReleaseAidl NO-SOURCE

Task :compileReleaseRenderscript NO-SOURCE

Task :checkReleaseManifest

Task :generateReleaseBuildConfig

Task :prepareLintJar

Task :generateReleaseSources

Task :javaPreCompileRelease

Task :mainApkListPersistenceRelease

Task :generateReleaseResValues

Task :generateReleaseResources

Task :mergeReleaseResources FAILED

8 actionable tasks: 8 executed

I am also facing the same issue. Are you able to solve this issue?

Hi, did you resolve the issue?