Symbol Not Found On OnActionExpandListener

android, android-support-library, c#, xamarin, xamarin.android

Solution

You can't reference both `Xamarin.Android.Support.V4` and `Mono.Android.Support.V4`.

I'd suggest referencing just `Xamarin.Android.Support.V4` as it is the updated binding to the Android Support Library v4. Remove `Mono.Android.Support.V4` and `android-support-v4.jar`.

Problem

I'm adding v4 support to my android application supporting gingerbread and up. I added ActionBarSherlock, which references Xamarin.Android.Support.v4. There is also a reference to Mono.Android.Support.v4 too. I also added the android-support-v4.jar file to the SupportLib folder, and set the Build Action to AndroidJavaLibrary. However, I'm getting an error I can't get past, which is: ``` /obj/Debug/android/src/mono/android/support/v4/view/MenuItemCompat_OnActionExpandListenerImplementor.java(41,41): Error: cannot find symbol symbol : class OnActionExpandListener location: class android.support.v4.view.MenuItemCompat android.support.v4.view.MenuItemCompat.OnActionExpandListener ``` Why is this error happening? How can it be resolved?

Original source