2

I am trying to implement the Xamarin.Auth library in a Xamarin.Forms project. After installing the library in my client project I received a System.NotImplementedException:

System.NotImplementedException: 

Portable Bait And Switch is nuget feature, so the package must be installed in all project. 
NotImplementedException will indicate that Portable Code from PCL is used and not Platform Specific implementation. 
Please check whether platform specific Assembly is properly installed.

Therefore, I installed the library in the Droid project as well. Once I did this, I started getting "Cannot find symbol" errors related to the CustomTabs control:

error: cannot find symbol
extends android.support.customtabs.CustomTabsCallback
symbol:   class CustomTabsCallback
location: package android.support.customtabs    Kpa.Mko.Mobile.Client.Droid
H:\...\obj\Debug\android\src\android\support\customtabs\CustomTabsClient_CustomTabsCallbackImpl.java

There are 6 of these errors in all, each one related to CustomTabs in some way.

We're using:

  • Xamarin.Auth 1.3.2.5 Xamarin.Forms 2.3.3.193
  • Xamarin.Android.Support.v7.AppCompat 25.1.1
  • Xamarin.Android.Support.v7.CardView 25.1.1
  • Xamarin.Android.Support.v7.MediaRouter 25.1.1
  • Xamarin.Android.Support.v7.RecyclerView 25.1.1

I've done some research on this problem in the Xamarin forums, here on Stack Overflow, and of course Google but none of the suggested fixes I found is solving my problem. I am completely confused as to what could be going on here. Am I missing the obvious?

Thanks!

William Smith
  • 1,949
  • 4
  • 25
  • 45

2 Answers2

2

Make sure you have the Xamarin.Android.Support.CustomTabs NuGet package installed. This is not, by default, included in the pre-packaged Xamarin.Android.Support packages that are loaded with the Android project template.

Rob Lyndon
  • 12,089
  • 5
  • 49
  • 74
2

Nuget package tuning can be problematic. I had numerous problems since I added Xamarin.Forms support. Try nuking all bin/ and obj/ folders, if not update SDK and then again nuke everything...

Xamarin.Auth nuget has dependencies and it should pull other stuff in.

Samples extracted from the repo:

https://github.com/moljac/Xamarin.Auth.Samples.NugetReferences

moljac
  • 946
  • 9
  • 12