0
votes

I'm using windows 10, unity 2017.2.03f, GooglePlayGamesPlugin-0.9.41. I've tried to figure this out but I'm at a complete loss. everything builds fine until i install playgames plugin. I've tried multiple solutions from both here and the unity community site with no luck. they fix these errors but create others resulting in still not being able to build. any help as to a solution would be greatly appreciated, thank you for your time and sorry if this is a stupid question. :)

ERROR 1:

Failed to compile resources with the following parameters:
-bootclasspath "C:/Android/sdk\platforms\android-25\android.jar" -d "C:\Users\Galatia420\Documents\My Games\Abby's In Space\Temp\StagingArea\bin\classes" -source 1.6 -target 1.6 -encoding UTF-8 "android\support\compat\R.java" "android\support\coreui\R.java" "android\support\coreutils\R.java" "android\support\fragment\R.java" "android\support\mediacompat\R.java" "android\support\v4\R.java" "com\Galatia420Games\AbbyChroniclesAbbysInSpace\R.java" "com\google\android\gms\R.java" "com\google\android\gms\auth\R.java" "com\google\android\gms\auth\api\R.java" "com\google\android\gms\base\R.java" "com\google\android\gms\drive\R.java" "com\google\android\gms\games\R.java" "com\google\android\gms\nearby\R.java" "com\google\android\gms\tasks\R.java" "com\google\example\games\mainlibproj\R.java" "com\google\games\bridge\R.java"
warning: [options] source value 1.6 is obsolete and will be removed in a future release
warning: [options] target value 1.6 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

ERROR 2:

UnityException: Resource compilation failed!
Failed to recompile android resource files. See the Console for details.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex)
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message)
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuildPointToConsole (System.String title, System.String message)
UnityEditor.Android.PostProcessor.Tasks.BuildResources.CompileResources (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.Tasks.BuildResources.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:271)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

ERROR 3:

Error building Player: 3 errors

ERROR 4:

Build completed with a result of 'Failed' UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

ERROR 5:

UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x00207] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:172 
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:83 
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
4

4 Answers

1
votes

For anyone who finds this and is having a similar problem, I found the answer is an issue with JDK 9 and unity. After trying about everything else i downgraded to jdk-8u152 and the issue is resolved.

0
votes

I'm with jdk 8u152 and unity 2017.2 and the issue persists... the issue came up when I selected "auto graphics api" remove the tick and select the graphics api that you want to use and the error will disappear ;)

0
votes

If someone has come this far and still error exist then you can do this following steps:

First, go to

File -> Build Settings or CTRL + SHIFT + B

and change this

build system gradle

to

build system internal

and it will Build as expected.

NOTE: You must have Android Studio Installed to work this.

0
votes

The problem occurs when the compiler conflicts with the plugins in your project. Open /Assets/Plugins and see if there are .jar files that are duplicates or different versions.