之後,我們升級谷歌Play服務:播放服務後,谷歌分析問題,升級到7.5
compile 'com.google.android.gms:play-services-base:7.5.0'
compile 'com.google.android.gms:play-services-analytics:7.5.0'
注意docs說,我們必須使用遊戲服務 - 分析:7.3.0,但是 因爲我們是使用play服務7.5,我們已經使用了開始時提到的配置。
該應用程序編譯正常,但我們注意到我們的Google Analytics(分析)不再發送到我們的服務器。而且當我們撥打電話Tracker.send()以下行會出現在每個事件的錯誤日誌:
06-30 10:51:43.188 13623-13752/com.fairfax.domain E/SQLiteLog﹕ (1032) statement aborts at 31: [INSERT OR REPLACE INTO properties(cid,app_uid,hits_count,adid,params,tid) VALUES (?,?,?,?,?,?)]
06-30 10:51:43.198 13623-13752/com.fairfax.domain E/GAv4﹕ Error storing a property: android.database.sqlite.SQLiteReadOnlyDatabaseException: attempt to write a readonly database (code 1032)
06-30 10:51:44.348 13623-13752/com.fairfax.domain E/SQLiteLog﹕ (1032) statement aborts at 31: [INSERT OR REPLACE INTO properties(cid,app_uid,hits_count,adid,params,tid) VALUES (?,?,?,?,?,?)]
06-30 10:51:44.358 13623-13752/com.fairfax.domain E/GAv4﹕ Error storing a property: android.database.sqlite.SQLiteReadOnlyDatabaseException: attempt to write a readonly database (code 1032)
06-3
我們代理的流量,發現它確實似乎沒有發送GA事件。
至於現在要解決此問題,我們進行了更改爲手動調度:
analytics.setLocalDispatchPeriod(0);
和手動調用:
GoogleAnalytics.getInstance(appContext).dispatchLocalHits();
不過,當然這是不太理想,如何將我們讓谷歌Analytics(分析)根據配置處理存儲/發送並不會得到錯誤?
UPD:可能值得一提的是,我們正在從播放服務6.5升級。
UPD2:我們再次代理網絡,現在看起來GA在一段時間後發送/批量請求。這些SQLite錯誤仍然存在:
8273-8329/com.fairfax.domain E/SQLiteLog﹕ (1032) statement aborts at 29: [INSERT OR REPLACE INTO properties(cid,app_uid,hits_count,adid,params,tid) VALUES (?,?,?,?,?,?)]
如果它在升級接縫之前起作用,那麼升級後它不起作用。我無法幫助Android,但我通過電子郵件向Google Analytics SDK團隊發送了錯誤消息。 – DaImTo
@DaIm對於那些SQLite錯誤在設備重新啓動後似乎消失。之後一切都按預期工作。話雖如此,但我們仍然猶豫要發佈7.5播放服務,因爲我們不能期望用戶經常重新啓動他們的設備。 –
你有沒有找到它的解決方案? –