playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.45k stars 961 forks source link

v 0.9.37 gradle build crash #1691

Open jejamaeul opened 7 years ago

jejamaeul commented 7 years ago

Only import 'play-games-plugin 0.9.37' on Unity 5.6.0f3 play-services-***-10.2.1

Android Build by Gradle(New)

Crash !!

CommandInvokationFailure: Gradle build failed. /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/bin/java -classpath "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-2.14.jar" org.gradle.launcher.GradleMain "assembleRelease"

stderr[ ///***/Clean/Temp/gradleOut/MainLibProj/build/intermediates/bundles/release/aapt/AndroidManifest.xml:31:28-65: AAPT: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 5.639 secs ] exit code: 1 UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.GradleWrapper.RunJava (System.String args, System.String workingdir, UnityEditor.Android.Progress progress) UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, UnityEditor.Android.Progress progress) UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.HostView:OnGUI()

chungh17 commented 7 years ago

I have same issues then i add version.xml into Plugins/Android/MainLibProj/res/values. version.xml content: `<?xml version="1.0" encoding="utf-8"?>

10298000 ` play services version value i get from android studio
claywilkinson commented 7 years ago

The gradle file generated by Unity does not understand dependencies correctly, so you need to add the play-services dependencies to the gradle file.