unity 2017.2.0f3 + gradle, can't find google-services.json file

2,431 views
Skip to first unread message

er...@simplemachine.co

unread,
Nov 14, 2017, 12:34:03 PM11/14/17
to Firebase Google Group
hi team,

so building my game via gradle in unity, it is trying to find the google-services.json but can't find it, even though i have added the json file to my unity-->assets-->resources folder.

any idea why this is so?

Anthony Maurice

unread,
Nov 15, 2017, 2:30:03 PM11/15/17
to fireba...@googlegroups.com
Hi,

I haven't been able to reproduce your problem, but my first thought is that the google-services.json file does not need to be under a resources folder, so I'd say try moving it up to just Unity-->Assets, to see if that makes it findable.

If that doesn't resolve it, can you post the exact error message you are getting?

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/5864e174-ca37-4a95-96b0-0bcaa662fa92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

er...@simplemachine.co

unread,
Nov 16, 2017, 12:34:57 AM11/16/17
to Firebase Google Group
also my google-services.json file is in unity->assets folder


On Wednesday, November 15, 2017 at 2:30:03 PM UTC-5, Anthony Maurice wrote:
Hi,

I haven't been able to reproduce your problem, but my first thought is that the google-services.json file does not need to be under a resources folder, so I'd say try moving it up to just Unity-->Assets, to see if that makes it findable.

If that doesn't resolve it, can you post the exact error message you are getting?
On Tue, Nov 14, 2017 at 9:01 AM, <er...@simplemachine.co> wrote:
hi team,

so building my game via gradle in unity, it is trying to find the google-services.json but can't find it, even though i have added the json file to my unity-->assets-->resources folder.

any idea why this is so?

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

er...@simplemachine.co

unread,
Nov 16, 2017, 12:34:57 AM11/16/17
to Firebase Google Group
Hey Anthony


i am trying to figure out if i can force a command in gradle to copy the .json file over but to no avail.

stack trace as follows:

CommandInvokationFailure: Gradle build failed. 
C:/Program Files/Java/jdk1.8.0_111\bin\java.exe -classpath "C:\Program Files\Unity2017.2\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-2.14.jar" org.gradle.launcher.GradleMain "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processReleaseGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it. 
   Searched Location: 
  C:\Users\SM\Desktop\Game\Temp\gradleOut\src\release\google-services.json
  C:\Users\SM\Desktop\Game\Temp\gradleOut\google-services.json

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
]
stdout[
Incremental java compilation is an incubating feature.
:preBuild UP-TO-DATE
:preReleaseBuild UP-TO-DATE
:checkReleaseManifest
:preDebugBuild UP-TO-DATE
:AN_Res:preBuild UP-TO-DATE
:AN_Res:preReleaseBuild UP-TO-DATE
:AN_Res:compileReleaseNdk UP-TO-DATE
:AN_Res:compileLint
:AN_Res:copyReleaseLint UP-TO-DATE
:AN_Res:mergeReleaseProguardFiles UP-TO-DATE
:AN_Res:packageReleaseRenderscript UP-TO-DATE
:AN_Res:checkReleaseManifest
:AN_Res:prepareReleaseDependencies
:AN_Res:compileReleaseRenderscript
:AN_Res:generateReleaseResValues UP-TO-DATE
:AN_Res:generateReleaseResources
:AN_Res:packageReleaseResources
:AN_Res:compileReleaseAidl
:AN_Res:generateReleaseBuildConfig
:AN_Res:mergeReleaseShaders
:AN_Res:compileReleaseShaders
:AN_Res:generateReleaseAssets
:AN_Res:mergeReleaseAssets
:AN_Res:processReleaseManifest
:AN_Res:processReleaseResources
:AN_Res:generateReleaseSources
:AN_Res:incrementalReleaseJavaCompilationSafeguard
:AN_Res:compileReleaseJavaWithJavac
:AN_Res:processReleaseJavaRes UP-TO-DATE
:AN_Res:transformResourcesWithMergeJavaResForRelease
:AN_Res:transformClassesAndResourcesWithSyncLibJarsForRelease
:AN_Res:mergeReleaseJniLibFolders
:AN_Res:transformNative_libsWithMergeJniLibsForRelease
:AN_Res:transformNative_libsWithSyncJniLibsForRelease
:AN_Res:bundleRelease
:Firebase:preBuild UP-TO-DATE
:Firebase:preReleaseBuild UP-TO-DATE
:Firebase:compileReleaseNdk UP-TO-DATE
:Firebase:compileLint
:Firebase:copyReleaseLint UP-TO-DATE
:Firebase:mergeReleaseProguardFiles UP-TO-DATE
:Firebase:packageReleaseRenderscript UP-TO-DATE
:Firebase:checkReleaseManifest
:Firebase:prepareReleaseDependencies
:Firebase:compileReleaseRenderscript
:Firebase:generateReleaseResValues UP-TO-DATE
:Firebase:generateReleaseResources
:Firebase:packageReleaseResources
:Firebase:compileReleaseAidl
:Firebase:generateReleaseBuildConfig
:Firebase:mergeReleaseShaders
:Firebase:compileReleaseShaders
:Firebase:generateReleaseAssets
:Firebase:mergeReleaseAssets
:Firebase:processReleaseManifest
:Firebase:processReleaseResources
:Firebase:generateReleaseSources
:Firebase:incrementalReleaseJavaCompilationSafeguard
:Firebase:compileReleaseJavaWithJavac
:Firebase:processReleaseJavaRes UP-TO-DATE
:Firebase:transformResourcesWithMergeJavaResForRelease
:Firebase:transformClassesAndResourcesWithSyncLibJarsForRelease
:Firebase:mergeReleaseJniLibFolders
:Firebase:transformNative_libsWithMergeJniLibsForRelease
:Firebase:transformNative_libsWithSyncJniLibsForRelease
:Firebase:bundleRelease
:prepareAn_billingLibrary UP-TO-DATE
:prepareAn_googleplayLibrary UP-TO-DATE
:prepareAn_socialLibrary UP-TO-DATE
:prepareAndroidnativeLibrary UP-TO-DATE
:prepareAnimatedVectorDrawable2600Library UP-TO-DATE
:prepareAppcompatV72600Library UP-TO-DATE
:prepareBuy3PaySupport100Library UP-TO-DATE
:prepareCardviewV72340Library UP-TO-DATE
:prepareComAndroidSupportSupportCompat2520Library UP-TO-DATE
:prepareComAndroidSupportSupportCoreUi2520Library UP-TO-DATE
:prepareComAndroidSupportSupportCoreUtils2520Library UP-TO-DATE
:prepareComAndroidSupportSupportFragment2520Library UP-TO-DATE
:prepareComAndroidSupportSupportMediaCompat2520Library UP-TO-DATE
:prepareComAndroidSupportSupportV42520Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBasement1160Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBasementLicense1160Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesTasks1160Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesTasksLicense1160Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseAnalytics1160Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseAnalyticsImpl1160Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseAnalyticsImplLicense1160Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseAnalyticsLicense1160Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseCommon1160Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseCommonLicense1160Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseCore1160Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseIid1160Library UP-TO-DATE
:prepareComGoogleFirebaseFirebaseIidLicense1160Library UP-TO-DATE
:prepareCustomtabs2600Library UP-TO-DATE
:prepareFacebookAndroidSdk4170Library UP-TO-DATE
:prepareFacebookAndroidWrapper794Library UP-TO-DATE
:prepareFirebaseAnalytics1142Library UP-TO-DATE
:prepareFirebaseAnalyticsImpl1142Library UP-TO-DATE
:prepareFirebaseAnalyticsImplLicense1142Library UP-TO-DATE
:prepareFirebaseAnalyticsLicense1142Library UP-TO-DATE
:prepareFirebaseAnalyticsUnity421Library UP-TO-DATE
:prepareFirebaseAppUnity421Library UP-TO-DATE
:prepareFirebaseCommon1142Library UP-TO-DATE
:prepareFirebaseCommonLicense1142Library UP-TO-DATE
:prepareFirebaseCore1142Library UP-TO-DATE
:prepareFirebaseIid1142Library UP-TO-DATE
:prepareFirebaseIidLicense1142Library UP-TO-DATE
:prepareGradleOutAN_ResUnspecifiedLibrary
:prepareGradleOutFirebaseUnspecifiedLibrary
:prepareMobileNativePopupsLibrary UP-TO-DATE
:preparePlayServicesAdsLibrary UP-TO-DATE
:preparePlayServicesAdsLiteLibrary UP-TO-DATE
:preparePlayServicesAnalyticsImplLibrary UP-TO-DATE
:preparePlayServicesAnalyticsLibrary UP-TO-DATE
:preparePlayServicesAppinviteLibrary UP-TO-DATE
:preparePlayServicesAuthBaseLibrary UP-TO-DATE
:preparePlayServicesAuthLibrary UP-TO-DATE
:preparePlayServicesBase1142Library UP-TO-DATE
:preparePlayServicesBaseLibrary UP-TO-DATE
:preparePlayServicesBaseLicense1142Library UP-TO-DATE
:preparePlayServicesBasement1142Library UP-TO-DATE
:preparePlayServicesBasementLibrary UP-TO-DATE
:preparePlayServicesBasementLicense1142Library UP-TO-DATE
:preparePlayServicesDriveLibrary UP-TO-DATE
:preparePlayServicesGamesLibrary UP-TO-DATE
:preparePlayServicesGcmLibrary UP-TO-DATE
:preparePlayServicesIdentity1142Library UP-TO-DATE
:preparePlayServicesIidLibrary UP-TO-DATE
:preparePlayServicesMaps1142Library UP-TO-DATE
:preparePlayServicesPlusLibrary UP-TO-DATE
:preparePlayServicesTasks1142Library UP-TO-DATE
:preparePlayServicesTasksLicense1142Library UP-TO-DATE
:preparePlayServicesWallet1142Library UP-TO-DATE
:prepareShopify_buy_pluginLibrary UP-TO-DATE
:prepareSupportCompat2600Library UP-TO-DATE
:prepareSupportCoreUi2600Library UP-TO-DATE
:prepareSupportCoreUtils2600Library UP-TO-DATE
:prepareSupportFragment2600Library UP-TO-DATE
:prepareSupportMediaCompat2600Library UP-TO-DATE
:prepareSupportV42600Library UP-TO-DATE
:prepareSupportVectorDrawable2600Library UP-TO-DATE
:prepareTweetComposer311Library UP-TO-DATE
:prepareTwitterCore311Library UP-TO-DATE
:prepareTwitterUnity311ReleaseLibrary UP-TO-DATE
:prepareReleaseDependencies
:compileReleaseAidl UP-TO-DATE
:compileReleaseRenderscript UP-TO-DATE
:generateReleaseBuildConfig UP-TO-DATE
:mergeReleaseShaders UP-TO-DATE
:compileReleaseShaders UP-TO-DATE
:generateReleaseAssets UP-TO-DATE
:mergeReleaseAssets
:generateReleaseResValues UP-TO-DATE
:processReleaseGoogleServices FAILED

BUILD FAILED

Total time: 12.089 secs
]
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.GradleWrapper.RunJava (System.String args, System.String workingdir, UnityEditor.Android.Progress progress)
Rethrow as GradleInvokationException: Gradle build failed
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)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

On Wednesday, November 15, 2017 at 2:30:03 PM UTC-5, Anthony Maurice wrote:
Hi,

I haven't been able to reproduce your problem, but my first thought is that the google-services.json file does not need to be under a resources folder, so I'd say try moving it up to just Unity-->Assets, to see if that makes it findable.

If that doesn't resolve it, can you post the exact error message you are getting?
On Tue, Nov 14, 2017 at 9:01 AM, <er...@simplemachine.co> wrote:
hi team,

so building my game via gradle in unity, it is trying to find the google-services.json but can't find it, even though i have added the json file to my unity-->assets-->resources folder.

any idea why this is so?

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

Anthony Maurice

unread,
Nov 16, 2017, 4:49:17 PM11/16/17
to fireba...@googlegroups.com
Thanks for the error logs, unfortunately I still haven't been able to reproduce your exact problem.

Can you confirm that you have the file at Assets/Plugins/Android/Firebase/res/values/google-services.xml?  It should be generated by the script under Assets/Firebase/Editor/generate_xml_from_google_services_json based on the google-services.json file you have.

Also, from Unity can you check the settings you have under Assets -> Play Services Resolver -> Android Resolver -> Settings? Specifically, are you using the default settings, or something different?

Additionally, as a potential workaround, have you tried exporting the Gradle project (under Build Settings, Export Project), and building the resulting project from Android Studio?  While less that ideal, it might work temporarily until we can figure out what is causing the problem you are seeing.


To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

er...@simplemachine.co

unread,
Nov 21, 2017, 10:16:40 AM11/21/17
to Firebase Google Group
Hey Anthony,

yes i can see the google-services.xml and yes I am using default settings.
fyi I tried to remove Facebook sdk and Stan's assets and I am still having this problem.

I tried to use android studio and I face another set of problems as well.

Anthony Maurice

unread,
Nov 28, 2017, 8:41:23 PM11/28/17
to fireba...@googlegroups.com
Sorry for the delay in getting back to you.

Unfortunately we still haven't been able to reproduce this on our end.

Have you seen this behavior on our sample projects? https://github.com/firebase/quickstart-unity  They are fairly simple, and might help narrow down the problem.

Another option is opening a support ticket, with which you could share your project.  https://firebase.google.com/support/contact/troubleshooting/

To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages