Bug 25180 - Google Play Services: ScreenViewBuilder.SetProductAction throws java.lang.NoSuchMethodError
Summary: Google Play Services: ScreenViewBuilder.SetProductAction throws java.lang.NoS...
Alias: None
Product: Components
Classification: Xamarin
Component: Xamarin Components ()
Version: Production (addons.xamarin.com)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jon Dick
Depends on:
Reported: 2014-12-09 09:08 UTC by Johan Driessen
Modified: 2014-12-19 16:45 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Johan Driessen 2014-12-09 09:08:03 UTC
When I call SetProductAction on HitBuilders.ScreenViewBuilder() I get a Java.Lang.NoSuchMethodError.

Code example:
var productAction = new ProductAction(ProductAction.ActionCheckout)
var hitBuilder = new HitBuilders.ScreenViewBuilder();

I/MonoDroid(12433): Java.Lang.NoSuchMethodError: Exception of type 'Java.Lang.NoSuchMethodError' was thrown.
I/MonoDroid(12433):   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
I/MonoDroid(12433):   at Android.Runtime.JNIEnv.GetMethodID (IntPtr kls, System.String name, System.String signature) [0x00000] in <filename unknown>:0 
I/MonoDroid(12433):   at Android.Gms.Analytics.HitBuilders+HitBuilder.SetProductAction (Android.Gms.Analytics.Ecommerce.ProductAction action) [0x00000] in <filename unknown>:0 
I/MonoDroid(12433):   at Flygbussarna.Droid.KopBiljett.KopBiljettFragment.TrackCheckout () [0x00000] in <filename unknown>:0 
I/MonoDroid(12433):   at Flygbussarna.Droid.KopBiljett.KopBiljettFragment+<Betala>c__async1.MoveNext () [0x00000] in <filename unknown>:0 
I/MonoDroid(12433):   --- End of managed exception stack trace ---
I/MonoDroid(12433): java.lang.NoSuchMethodError: no non-static method "Lcom/google/android/gms/analytics/HitBuilders$HitBuilder;.setProductAction(Lcom/google/android/gms/analytics/ecommerce/ProductAction;)Ljava/lang/Object;"
I/MonoDroid(12433): 	at mono.java.lang.RunnableImplementor.n_run(Native Method)
I/MonoDroid(12433): 	at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:29)
I/MonoDroid(12433): 	at android.os.Handler.handleCallback(Handler.java:739)
I/MonoDroid(12433): 	at android.os.Handler.dispatchMessage(Handler.java:95)
I/MonoDroid(12433): 	at android.os.Looper.loop(Looper.java:135)
I/MonoDroid(12433): 	at android.app.ActivityThread.main(ActivityThread.java:5221)
I/MonoDroid(12433): 	at java.lang.reflect.Method.invoke(Native Method)
I/MonoDroid(12433): 	at java.lang.reflect.Method.invoke(Method.java:372)
I/MonoDroid(12433): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
I/MonoDroid(12433): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Comment 2 Jon Dick 2014-12-19 16:45:05 UTC
This is fixed in the v22.0.0 release which is now available on NuGet.