First I started developing Android with C# and Xamarin a week ago, and I'm stuck in this problem.
I already found several texts in Stack Overflow, but sadly didn't work.
To solve this problem, I took some steps.
Before following things, when I start debug with Android_Accelerated_x86
(Android 6.0 -API 23), Visual Studio start find NavigationPageRenderer
but is not there then I got message title above
I installed and updated Packages using Android SDK Manager like following
Then, I met message wrote on title
System.MissingMethodException: Method
Android.Support.V4.Widget.DrawerLayout.AddDrawerListener' not found
So, I struggled to find solution and
I downloaded JDK 1.8.0_101 and changed path of Java Development Kit Location (in Tools > Option > Xamarin > Android Setting) but it didn't work. I've got the same message like title above.
I went to Tools > NuGet Package Manager > Manage NuGet Packages for Solution and updated only Xamarin.Forms v2.3.2.127. Then I got 7 errors. One of them is
Error: package
android.support.v7.internal.widget
does not exist.
And I deleted the solution and make new project with Xamarin.Forms I got the Warnings message like
IDE0006 Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled
and... I got the message like title above.
Also I got two 'Call Stack'
0x23 in Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.OnAttachedToWindow at NavigationPageRenderer.cs
0xA in Android.Views.View.n_OnAttachedToWindow at Android.Views.View.cs:
Please help me to solve this problem... Thanks a lot for your attention
This issue happens because Google changed their support libraries in which you hookup this listener from SetDrawerListener()
to AddDrawerListener()
. Because of this you will need to ensure you're on the latest stable Xamarin.Forms. Previous versions of Xamarin.Forms that have a dependency on < Android.Support
23.3 will throw this error. You can refer to this commit for more details:
https://github.com/xamarin/Xamarin.Forms/commit/d9ed63f0add8345cf6ab1508b353dcbdacbcd97c
Ideally this should be fixed in Xamarin.Forms versions 2.2.0.31 and greater.
https://www.nuget.org/packages/Xamarin.Forms/
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