locked
NavigationPage RRS feed

  • Question

  • User296956 posted

    Hi,

    I have a simple example with a splash screen and a page that will be loaded afterwards. According to the navigation tutorials I changed the code to public partial class App: Application { public App() { InitializeComponent(); MainPage = new NavigationPage(new App5.MainPage()); } }

    The Code compiles but I receive an error message:

    Unhandled Exception: System.MissingMethodException: Method 'Android.Support.V4.Widget.DrawerLayout.AddDrawerListener' not found.

    I can't find that package with NuGet in the installed section nor in another section. I could update my libraries, but the first time I did that, I was not able to compile my project anymore.

    Thanks in advance

    Monday, February 6, 2017 8:30 AM

Answers

  • User92861 posted

    The NuGet packages look fine now. The new errors indicate an issue with the actual support libraries jars which are automatically downloaded during build if they are not already present on the machine. Check out this guide on how to resolve the errors: https://developer.xamarin.com/guides/android/troubleshooting/resolving-library-installation-errors/

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, February 7, 2017 11:13 PM

All replies

  • User296956 posted

    In my Android Project this is my packages.config: <?xml version="1.0" encoding="utf-8"?> <packages> <package id="Xamarin.Android.Support.Design" version="23.0.1.3" targetFramework="monoandroid60" /> <package id="Xamarin.Android.Support.v4" version="23.0.1.3" targetFramework="monoandroid60" /> <package id="Xamarin.Android.Support.v7.AppCompat" version="23.0.1.3" targetFramework="monoandroid60" /> <package id="Xamarin.Android.Support.v7.CardView" version="23.0.1.3" targetFramework="monoandroid60" /> <package id="Xamarin.Android.Support.v7.MediaRouter" version="23.0.1.3" targetFramework="monoandroid60" /> <package id="Xamarin.Forms" version="2.2.0.45" targetFramework="monoandroid60" /> </packages>

    Monday, February 6, 2017 8:53 AM
  • User92861 posted

    There was an issue with the Visual Studio templates that was fixed in Cycle 8 SR2 that caused this crash. To resolve the error in your project:

    1. Upgrade Xamarin.Android.Support.v7.AppCompat to version 23.3.0
    2. Add Xamarin.Android.Support.v7.RecyclerView version 23.3.0
    3. Clean and Rebuild
    Monday, February 6, 2017 8:34 PM
  • User296956 posted

    Hi,

    if I do that I receive lots of error messages. I am going to add two images which shows the error messages and the nu get libs of my android project

    best regards

    Tuesday, February 7, 2017 7:59 AM
  • User277570 posted

    First Remove Xamarin.Forms from the solution and then install it again, It will automatically add all the packages it requires like all you have shown in above message(image).

    Tuesday, February 7, 2017 2:57 PM
  • User92861 posted

    The NuGet packages look fine now. The new errors indicate an issue with the actual support libraries jars which are automatically downloaded during build if they are not already present on the machine. Check out this guide on how to resolve the errors: https://developer.xamarin.com/guides/android/troubleshooting/resolving-library-installation-errors/

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, February 7, 2017 11:13 PM
  • User108859 posted

    Hi @amos1979

    You can try with this solution: https://vicenteguzman.mx/2017/01/15/error-android-support-v4-widget-drawerlayout-adddrawerlistener-not-found-xamarin-forms/

    Regards!!

    Tuesday, February 7, 2017 11:51 PM
  • User296956 posted

    @Jimmy,

    I deleted the Xamarin *libraries from the AppData/local directory and rebuilt the project. Yesterday I did the same but had another couple of errors. I reinstalled visual studio with xamarin and upated to the latest version via upate. Big thx, that helped :)

    Wednesday, February 8, 2017 5:33 AM