我正在设置一个现有应用,其中包含通过Google Analytics提供的一些活动跟踪事件.我已经添加了所有gradle更改,但没有,但我一直收到与重复google_app_ids相关的错误.我知道其中一个ID最初是在我的应用中使用谷歌地图.我相信我可能会从您必须为Google Analytics添加的google-services.json文件生成的一个自动生成一个新的google_app_id.我不确定如何解决它.
这是我在尝试构建时遇到的错误:
Error:Execution failed for task ':app:mergeDebugResources'.
> [string/google_app_id] C:\Users\smithm24\AndroidStudioProjects\NOAAHSO\app\src\main\res\values\strings.xml [string/google_app_id]
C:\Users\smithm24\AndroidStudioProjects\NOAAHSO\app\build\generated\res\google-services\debug\values\values.xml: Error: Duplicate resources
Run Code Online (Sandbox Code Playgroud)
这是我的values.xml,它是自动生成的文件:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="ga_trackingId" translatable="false">UA-76597942-1</string>
<string name="gcm_defaultSenderId" translatable="false">287841560662</string>
<string name="google_app_id" translatable="false">1:287841560662:android:18d8b4b538346094</string>
</resources>
Run Code Online (Sandbox Code Playgroud)
这是我的带有我的app id的strings.xml我很久以前为Google Maps添加了:
<resources>
<string name="app_name">Weather AND Haul Route</string>
<string name="action_settings">Settings</string>
<string name="button_text">Get Weather</string>
<string name="title_activity_maps">Map</string>
<string name="google_app_id">380060644351</string>
</resources>
Run Code Online (Sandbox Code Playgroud) android google-analytics android-studio google-analytics-firebase google-analytics-sdk
这是我的查询:
WITH desc_table(counter, hourly, current_weather_description, current_icons, time_stamp) AS (
Select count(*) AS counter, CASE WHEN strftime('%M', 'now') < '30'
THEN strftime('%H', 'now')
ELSE strftime('%H', time_stamp, '+1 hours') END as hourly,
current_weather_description,
current_icons,
time_stamp
From weather_events
GROUP BY strftime('%H', time_stamp, '+30 minutes'), current_weather_description
UNION ALL
Select count(*) as counter, hourly - 1, current_weather_description, current_icons, time_stamp
From weather_events
GROUP BY strftime('%H', time_stamp, '+30 minutes'), current_weather_description
Order By counter desc limit 1
),
avg_temp_table(avg_temp, hour_seg, time_stamp) AS (
select avg(current_temperatures) as avg_temp, CASE …
Run Code Online (Sandbox Code Playgroud)