Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
386 views
in Technique[技术] by (71.8m points)

c# - Where can i add google-services.json in xamarin app

Hi we are developing Xamarin application where we want monitor how many peoples install application from our referral id.

Im find this document https://developers.google.com/analytics/devguides/collection/android/v4/ where it says "Copy the google-services.json file you just downloaded into the app/ or mobile/ directory of your Android Studio project.".

I have visual studio (2013) project where these folders are missing of course. Question is, where i add the google-services.json file in visual studio project ?

Thanks in advance

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I don't know when it became necessary, but as I'm posting this (in May 2017), it is necessary. I placed mine in the same directory that my Android .csproj file was located. I then added it to the project and made sure that Xamarin.GooglePlayServices.Base.targets was in my .csproj. I read that rebuilding would be sufficient for making the proper build action to appear, but building and restarting XS is what did it for me. The final result in my .csproj was this:

<ItemGroup>
    <GoogleServicesJson Include="google-services.json" />
</ItemGroup>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...