I want to use gradle-experimental:0.6.0-alpha7 to use the NDK build integration in Android Studio 1.5.1. But now my google-services.json is not converted anymore to for instance a R.xml.global_tracker for analytics.
I use
classpath 'com.android.tools.build:gradle-experimental:0.6.0-alpha7'
classpath 'com.google.gms:google-services:2.0.0-alpha6'
in my global build.gradle and
apply plugin: 'com.android.model.application'
apply plugin: 'com.google.gms.google-services'
on top of my app gradle file.
The com.google.gms:google-services plugin used to work when I used com.android.tools.build:gradle:1.5.0 but now R.xml.global_tracker cannot be found and when I manually set the tracker ID it doesn't track anything.
Is there a combination of the google services gradle plugin and gradle experimantal that works?
No the experimantal plugin does not yet work with google-services gradle plugin. I've tested with the latest 0.7.2 and 0.8.0-alpha4 experimantal plugin but with no luck.
However, a workaround does work for me.
According to the document of Google Services Gradle Plugin, what it does is mainly reads google-services.json in and produce two XML files. The document describes the data mapping between the XML and json very well so one can totally produce those XML files manually or by simple scripts.
For my case, I just download the google-services.json file and produce the XML files by hand. Then:
Rebuild the apk and it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With