playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.46k stars 967 forks source link

Build failed in Unity 2018 #2274

Open nicolasdeory opened 6 years ago

nicolasdeory commented 6 years ago

Gradle build fails if the GPGS package is on my Unity project. I've tried using 0.9.50 and 0.9.45, with no difference. "Google play services" is installed on the SDK manager.

These are the build errors:

CommandInvokationFailure: Gradle build failed. 
C:\Program Files (x86)\Java\jdk1.8.0_172\bin\java.exe -classpath "D:\Software\Instalado\Unity 2018.2.2\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.2.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx1024m" "assembleDebug"

stderr[
C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\color\common_google_signin_btn_text_light.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable\common_google_signin_btn_text_disabled.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-xxhdpi-v4\common_google_signin_btn_icon_light_normal_background.9.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-hdpi-v4\common_google_signin_btn_icon_dark_normal_background.9.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-xhdpi-v4\common_google_signin_btn_icon_dark_normal_background.9.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-auth-11.0.4.aar\239df467269e2fae8b4416233738c0c2\res\drawable-watch-v20\common_google_signin_btn_text_disabled.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable\common_google_signin_btn_text_dark_normal.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-mdpi-v4\common_google_signin_btn_text_dark_normal_background.9.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable\common_google_signin_btn_text_light_focused.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable\common_google_signin_btn_text_dark.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable\common_google_signin_btn_text_light_normal.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable\common_google_signin_btn_icon_dark_focused.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-xxhdpi-v4\common_google_signin_btn_text_light_normal_background.9.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-auth-11.0.4.aar\239df467269e2fae8b4416233738c0c2\res\drawable-watch-v20\common_google_signin_btn_text_light_normal.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-xhdpi-v4\common_full_open_on_phone.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-xxhdpi-v4\common_google_signin_btn_icon_dark_normal_background.9.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable\common_google_signin_btn_icon_light_focused.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-mdpi-v4\common_google_signin_btn_text_light_normal_background.9.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-xhdpi-v4\common_google_signin_btn_text_light_normal_background.9.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable\common_google_signin_btn_icon_light.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-mdpi-v4\common_google_signin_btn_icon_dark_normal_background.9.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable\common_google_signin_btn_icon_disabled.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-xhdpi-v4\common_google_signin_btn_icon_light_normal_background.9.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable\common_google_signin_btn_icon_dark.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-xhdpi-v4\common_google_signin_btn_text_dark_normal_background.9.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-hdpi-v4\common_full_open_on_phone.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-mdpi-v4\common_google_signin_btn_icon_light_normal_background.9.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-hdpi-v4\common_google_signin_btn_text_light_normal_background.9.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-xhdpi-v4\googleg_disabled_color_18.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-hdpi-v4\common_google_signin_btn_icon_light_normal_background.9.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-xxhdpi-v4\googleg_standard_color_18.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-hdpi-v4\common_google_signin_btn_text_dark_normal_background.9.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-xxhdpi-v4\common_google_signin_btn_text_dark_normal_background.9.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable\common_google_signin_btn_text_light.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\color\common_google_signin_btn_text_dark.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-hdpi-v4\googleg_standard_color_18.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-mdpi-v4\googleg_disabled_color_18.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable\common_google_signin_btn_text_dark_focused.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable\common_google_signin_btn_icon_light_normal.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable\common_google_signin_btn_icon_dark_normal.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\color\common_google_signin_btn_tint.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-hdpi-v4\googleg_disabled_color_18.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-auth-11.0.4.aar\239df467269e2fae8b4416233738c0c2\res\drawable-watch-v20\common_google_signin_btn_text_dark_normal.xml: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-mdpi-v4\googleg_standard_color_18.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-xhdpi-v4\googleg_standard_color_18.png: error: file not found.

C:\Users\Nicol?s\.gradle\caches\transforms-1\files-1.1\play-services-base-11.0.4.aar\6e2bc93eee1e2f8bc5f95c9c1384bda5\res\drawable-xxhdpi-v4\googleg_disabled_color_18.png: error: file not found.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
]
stdout[
:preBuild UP-TO-DATE
:MainLibProj:preBuild UP-TO-DATE
:MainLibProj:preDebugBuild UP-TO-DATE
:MainLibProj:checkDebugManifest
:MainLibProj:processDebugManifest
:preDebugBuild
:MainLibProj:compileDebugAidl
:compileDebugAidl
:MainLibProj:packageDebugRenderscript NO-SOURCE
:compileDebugRenderscript
:checkDebugManifest
:generateDebugBuildConfig
:prepareLintJar
:generateDebugResValues
:generateDebugResources
:MainLibProj:compileDebugRenderscript
:MainLibProj:generateDebugResValues
:MainLibProj:generateDebugResources
:MainLibProj:packageDebugResources
:mergeDebugResources
Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
:mergeDebugResources FAILED
14 actionable tasks: 14 executed
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1 progress, System.String error)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1 progress)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1 progress)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Gunasekhar738 commented 6 years ago

Hi i get similar error but i have java.net.UnknownHostException. This only happes in my MacOS but works fine in windows. Can someone please help

Gradle failed to fetch dependencies.

Failed to run '/Users/guna_pc/Desktop/Allien_Hole/Temp/PlayServicesResolverGradle/gradlew -b "/Users/guna_pc/Desktop/Allien_Hole/Temp/PlayServicesResolverGradle/PlayServicesResolver.scripts.download_artifacts.gradle" --no-daemon "-PANDROID_HOME=/Users/guna_pc/Library/Android/sdk" "-PTARGET_DIR=/Users/guna_pc/Desktop/Allien_Hole/Assets/Plugins/Android" "-PMAVEN_REPOS=file:////Users/guna_pc/Desktop/Allien_Hole/Assets/GooglePlayGames/Editor/m2repository" "-PPACKAGES_TO_COPY=com.google.games:gpgs-plugin-support:0.9.50"' stdout: Downloading https://services.gradle.org/distributions/gradle-4.2.1-bin.zip

stderr: Exception in thread "main" java.net.UnknownHostException: services.gradle.org at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:673) at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) at sun.net.www.protocol.https.HttpsClient.(HttpsClient.java:264) at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263) at org.gradle.wrapper.Download.downloadInternal(Download.java:60) at org.gradle.wrapper.Download.download(Download.java:45) at org.gradle.wrapper.Install$1.call(Install.java:62) at org.gradle.wrapper.Install$1.call(Install.java:48) at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69) at org.gradle.wrapper.Install.createDist(Install.java:48) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)

exit code: 1

UnityEngine.Debug:LogError(Object) Google.Logger:Log(String, LogLevel) GooglePlayServices.PlayServicesResolver:Log(String, LogLevel) GooglePlayServices.cAnonStorey14:<>m1F(Result) GooglePlayServices.cAnonStorey15:<>m28() GooglePlayServices.PlayServicesResolver:PumpUpdateQueue() UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

Gunasekhar738 commented 6 years ago

I believe the solution to this is to add systemProp.http.proxyHost=[192.168.1.1] systemProp.http.proxyPort=[8080] in the gradle.poperties. But where do i find my proxyhost and proxyport on my mac?

Gunasekhar738 commented 6 years ago

Actually i had to change some network sttings in my mac to resolve this