google-analytics-plugin icon indicating copy to clipboard operation
google-analytics-plugin copied to clipboard

Android - NoSuchMethodException when setting custom dimensions.

Open Luro91 opened this issue 7 years ago • 1 comments

Hi,

we want to use custom dimensions for our events. It worked fine on iOS but on Android the dimensions were not set, so we added some log statements. We found out that the following errors are thrown in these lines: java.lang.NoSuchMethodException: setCustomDimension [int, class java.lang.String] https://github.com/danwilson/google-analytics-plugin/blob/master/android/UniversalAnalyticsPlugin.java#L187
java.lang.NoSuchMethodException: setCustomMetric [int, float] https://github.com/danwilson/google-analytics-plugin/blob/master/android/UniversalAnalyticsPlugin.java#L204

Setup: Cordova: 6.1.1 Cordova Android: 4.1.1 Android Support Repository: 42 Google Play Services: 46 Google Repository: 42

Luro91 avatar Dec 11 '17 09:12 Luro91

It works with Android Support Repository v47 and Google Repository v58. Unfortunately we can not update to that versions because of another dependency. Does someone know a workaround?

Luro91 avatar Dec 19 '17 07:12 Luro91