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?
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
.
I had the exact same problem using Xamarin studio after switching my solution to work with Xamarin Forms instead of native android.
What did the trick for me and solved it was to clean my project and rebuild (Build --> Clean All) Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With