question

N2517-2864 avatar image
0 Votes"
N2517-2864 asked JarvanZhang-MSFT answered

How to fix the issue Google Tag Manager integration with Xamarin Android App

I am developing Mobile app using Xamarin Android. I have integrated Firebase with our app successfully. I am using GTM android version 5. https://developers.google.com/tag-manager/android/v5

Google Tag Manager container with test tag (GTM-xxxxxxx.json) is placed in Assets/Containers folder as specified, however while all event records ARE showing up in Firebase Analytics console, they do not seem to be sent to GTM. Logs seem to indicate an issue with loading GTM:

Failed to invoke Tag Manager's initialize() method: java.lang.reflect.InvocationTargetException: com.google.android.gms.measurement.internal.zzda.zza(Unknown Source:97)

and error when run container preview:

Java.Lang.NoSuchMethodError: 'No virtual method transactAndReadExceptionReturnVoid(ILandroid/os/Parcel;)V in class Lcom/google/android/gms/internal/measurement/zzq; or its super classes (declaration of 'com.google.android.gms.internal.measurement.zzq' appears in /data/app/com.xxpackage.xxname-OT45U1GpA6ulFZw56hg9XQ==/base.apk)'
Using following Nuget Packages:

"Xamarin.Firebase.Analytics" 71.1630.4
"Xamarin.Firebase.Analytics.Impl" 71.1630.4
"Xamarin.Firebase.Messaging" 121.0.1
"Xamarin.GooglePlayServices.TagManager" 71.1604.4
android minSdkVersion="24" and targetSdkVersion="30"

Any insight into this issue would be super helpful, as my search hasn't turned up anything useful that is Xamarin-related so far.


dotnet-xamarin
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JarvanZhang-MSFT avatar image
0 Votes"
JarvanZhang-MSFT answered

Hello N2517-2864,​

Welcome to our Microsoft Q&A platform!

This may be related to the version compatibility with 'Xamarin.GooglePlayServices.TagManager' package. Someone faced the similar issue, the workaround is to download the package to 60 version. Here is the topic, you could refer to it. https://github.com/xamarin/GooglePlayServicesComponents/issues/260

If the problem described by the link is different from the one you are experiencing, it's suggested to open a new thread to report the issue to the github repo.

Best Regards,

Jarvan Zhang


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.