我使用了这里提供的答案: google-services.json for different productFlavors将google-services.json文件添加到我的app / src / dev flavor文件夹,将一个文件添加到我的app / src / production flavor文件夹中。我的dev调试版本将在我的仪表板中生成事件,但我的生产版本变体不会。 tracking_id是正确的,所以不确定我缺少什么。
以下是我的生产风格的google-services-json文件:
{
"project_info": {
"project_id": "shopper-64392",
"project_number": "475366498847",
"name": "Shopper"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:475366498847:android:847eba250b1fe1a7",
"client_id": "android:ts.kiosk.app.shoppers",
"client_type": 1,
"android_client_info": {
"package_name": "ts.kiosk.app.shoppers",
"certificate_hash": []
}
},
"oauth_client": [],
"api_key": [],
"services": {
"analytics_service": {
"status": 2,
"analytics_property": {
"tracking_id": "UA-76684740-1"
}
},
"cloud_messaging_service": {
"status": 1,
"apns_config": []
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"google_signin_service": {
"status": 1
},
"ads_service": {
"status": 1
}
}
}
],
"client_info": [],
"ARTIFACT_VERSION": "1"
}