由于错误,无法在Xamarin android中实现google标记管理器gtm-xxxx.json的资源目录名称无效

时间:2021-08-30 15:13:28

I am implementing Google tag manager in my Xamarin Android application using this reference link: https://developers.google.com/tag-manager/android/v4/

我正在使用此参考链接在我的Xamarin Android应用程序中实施Google代码管理器:https://developers.google.com/tag-manager/android/v4/

As Steps mentioned in above link to add default container file in your project, I am trying to download container file, but i am getting GTM-XXXX.json not the binary file.

正如上面提到的步骤链接在项目中添加默认容器文件,我试图下载容器文件,但我得到GTM-XXXX.json而不是二进制文件。

Also I am facing another problem while adding this JSON file in resource folder Resource/raw. Facing error: Invalid resource directory name: gtm-XXXX.json

此外,我在资源文件夹Resource / raw中添加此JSON文件时面临另一个问题。面临错误:无效的资源目录名称:gtm-XXXX.json

Also i have referred below project sample from git hub: https://github.com/IdoTene/XamarinTagManagerAndroid

我也从git hub下面提到了项目样本:https://github.com/IdoTene/XamarinTagManagerAndroid

Please suggest me solution to implement GTM in Xamarin Android.

请建议我在Xamarin Android中实施GTM的解决方案。

1 个解决方案

#1


0  

It sounds like you might be trying to use one of the new Android containers with the older SDK. If you want to use the old SDK, you'll have to create an 'Android (legacy)' container, which will have a binary container file.

听起来您可能正在尝试使用旧版SDK中的一个新Android容器。如果您想使用旧版SDK,则必须创建一个“Android(旧版)”容器,该容器将包含二进制容器文件。

#1


0  

It sounds like you might be trying to use one of the new Android containers with the older SDK. If you want to use the old SDK, you'll have to create an 'Android (legacy)' container, which will have a binary container file.

听起来您可能正在尝试使用旧版SDK中的一个新Android容器。如果您想使用旧版SDK,则必须创建一个“Android(旧版)”容器,该容器将包含二进制容器文件。