tec*_*hie 4 admob xamarin.android xamarin xamarin.forms
我正在尝试将 Google Ads 与该软件包一起使用MarcTron.AdMob。
安装后,我需要安装一些依赖项并更新一些软件包,正如它所说的那样:
Xamarin.AndroidX.Browser
Xamarin.Google.Android.Material
Xamarin.AndroidX.Lifecycle.LiveData
Xamarin.AndroidX.Legacy.Support.V4
Run Code Online (Sandbox Code Playgroud)
但是在我安装/更新所有这些依赖项之后,我再次编译并收到错误:
2>myproject.Android\obj\Debug\100\lp\111\jl\res\values\values.xml(1482): error APT1000: Attribute "android:translationX" has already been defined
2>myproject.Android\obj\Debug\100\lp\111\jl\res\values\values.xml(1486): error APT1000: Attribute "android:translationY" has already been defined
2>myproject.Android\obj\Debug\100\lp\111\jl\res\values\values.xml(1489): error APT1000: Attribute "android:translationZ" has already been defined
2>myproject.Android\obj\Debug\100\lp\83\jl\res\values\values.xml(4): error APT1000: Found tag id where item is expected
2>myproject.Android\obj\Debug\100\lp\82\jl\res\values\values.xml(4): error APT1000: Found tag id where item is expected
2>myproject.Android\obj\Debug\100\lp\76\jl\res\values\values.xml(4): error APT1000: Found tag id where item is expected
Run Code Online (Sandbox Code Playgroud)
我已经做了什么:
colors.xml删除了我的资源中的空白styles.xml(这是我看到的另一个解决方案);什么都没起作用。
我尝试使用Xamarin.Firebase.Ads代替,MarcTron.AdsMob但我出现了同样的错误。
这是什么错误?我该如何解决它?我确实需要在应用程序上放置广告,但由于此错误我无法继续该项目。