question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mono.Cecil.ResolutionException: Failed to resolve Android.Gms.Ads.InterstitialAd

See original GitHub issue

Describe the bug If I build my Android App with Version 1.6.1, get an error (see full log below).

Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA2006: Der Verweis auf "Android.Gms.Ads.InterstitialAd" (definiert in Assembly "Plugin.MtAdmob, Version=1.6.1.0, Culture=neutral, PublicKeyToken=null") mit dem Bereich "Xamarin.GooglePlayServices.Ads.Lite, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" konnte nicht aufgelöst werden

I tried Android 10 and Android 11 as target version, both giving me this issue. Thanks for looking into this!

To Reproduce Steps to reproduce the behavior:

  1. Update to latest version (your plugin and Xamarin.Firebase.Ads)
  2. Click build for Android

Smartphone (please complete the following information):

  • OS: Android 10, 11
  • Version 1.6.1

Additional context

Schweregrad	Code	Beschreibung	Projekt	Datei	Zeile	Unterdrückungszustand
Fehler		Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA2006: Der Verweis auf "Android.Gms.Ads.InterstitialAd" (definiert in Assembly "Plugin.MtAdmob, Version=1.6.1.0, Culture=neutral, PublicKeyToken=null") mit dem Bereich "Xamarin.GooglePlayServices.Ads.Lite, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" konnte nicht aufgelöst werden. Wenn sich der Bereich von der definierenden Assembly unterscheidet, weist dies üblicherweise auf einen weitergeleiteten Typ hin. ---> Mono.Cecil.ResolutionException: Failed to resolve Android.Gms.Ads.InterstitialAd
   bei Mono.Linker.Steps.MarkStep.HandleUnresolvedType(TypeReference reference)
   bei Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
   bei MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference)
   bei Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field)
   bei Mono.Linker.Steps.MarkStep.MarkEntireType(TypeDefinition type)
   bei Mono.Linker.Steps.MarkStep.MarkEntireAssembly(AssemblyDefinition assembly)
   bei Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
   bei Mono.Linker.Steps.MarkStep.Initialize()
   bei Mono.Linker.Steps.MarkStep.Process(LinkContext context)
   bei MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
   bei Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
   bei Mono.Linker.Pipeline.Process(LinkContext context)
   bei MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
   bei Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
   --- Ende der internen Ausnahmestapelüberwachung ---
   bei Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
   bei Xamarin.Android.Tasks.LinkAssemblies.RunTask()
   bei Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /Users/builder/azdo/_work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:Zeile 17.	3dPrintCostCalculatorLite.Android		

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
marcojakcommented, Aug 14, 2021

The new version is online. I did some tests and it worked fine. Let me know if it works for you.

1reaction
marcojakcommented, Aug 11, 2021

Hi @AndreasReitberger I’m working on it and part of the code is already here (in a secondary branch). I need to do some tests but apparently everything works fine on Android, I need anyway to do some more work on iOS and test it there. August doesn’t help but I’m currently working on it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: cannot find symbol import com.google.android.gms. ...
InterstitialAd has been deprecated since version 19.7.0 and has since been totally removed. The new import should be: import com.google.android.
Read more >
Admob for Xamarin made easy
In this tutorial, I'll show how to add Google ads banners and insterstitials in a ... Cecil.ResolutionException: Failed to resolve System.Void Android.
Read more >
How to fix " cannot find symbol import com.google.android. ...
In this video i show you How to fix "error: cannot find symbol import com.google.android.gms.ads.InterstitialAd" in Android Studio For any ...
Read more >
How to add Interstitial Ads in Xamarin.android
Firstly, Google update them Interstitial ADmob 's API. So when we install the latest version(V 120.2.0) of Xamarin.GooglePlayServices.Ads , you ...
Read more >
Failed resolution of required google ad classes, keeps ...
I am building an Android game in Unity, and wanted to incorporate Google AdMob. ... ClassNotFoundException: com.google.android.gms.ads.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found