mapbox/mapbox-android-demo

File google-services.json is missing. The Google Services Plugin cannot function without it

tsuz opened this issue · 7 comments

tsuz commented

What

Cannot build due to this error:

Execution failed for task ':MapboxAndroidDemo:processChinaDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it. 
   Searched Location: 
  /Users/takutosuzuki/Documents/projects/mapbox-android-demo/MapboxAndroidDemo/src/china/google-services.json
  /Users/takutosuzuki/Documents/projects/mapbox-android-demo/MapboxAndroidDemo/src/debug/google-services.json
  /Users/takutosuzuki/Documents/projects/mapbox-android-demo/MapboxAndroidDemo/src/chinaDebug/google-services.json
  /Users/takutosuzuki/Documents/projects/mapbox-android-demo/MapboxAndroidDemo/src/china/debug/google-services.json
  /Users/takutosuzuki/Documents/projects/mapbox-android-demo/MapboxAndroidDemo/src/debug/china/google-services.json
  /Users/takutosuzuki/Documents/projects/mapbox-android-demo/MapboxAndroidDemo/google-services.json

Versions

Android Studio 4.1

Branch master (commit)

Reproduce steps

  1. Create new folder and clone from this repository
  2. Follow the installation method in the README
  3. Build
  4. Build Fails

The build succeeds with one previous commit

+1

+1

We can't upload google-services.json to this repo, because it's public.
For those who want to run the demo project locally, please remove the following line in build.gralde file of MapboxAndroidDemo module.

apply plugin: 'com.google.gms.google-services'

tsuz commented

@Chaoba

Can you elaborate why this line is necessary? If it's not, we should remove this.

@tsuz Please visit https://firebase.google.com/docs/crashlytics/get-started?platform=android, we are using firebase to collect data for annalize, so we must apply google-service plugin. However, we already have the config for release, so this line is needless, I have fixed it here.

tsuz commented

@Chaoba

Thanks for the reply. Will that fix this issue of running the demo without the google services? If so, I can close my PR.

Yes, it will fix this issue.