Git Product home page Git Product logo

Comments (2)

Solethia avatar Solethia commented on August 18, 2024

Hi @jsmarcus

I have trouble using IconToolbarItem aswell. I get the following error when running your sample project:


{System.InvalidCastException: Specified cast is not valid.
  at Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.SetupToolbar () [0x00007] in C:\BuildAgent3\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\NavigationPageRenderer.cs:525 
  at Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1 e) [0x000b2] in C:\BuildAgent3\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\AppCompat\NavigationPageRenderer.cs:214 
  at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (Xamarin.Forms.Platform.Android.TElement element) [0x000f4] in C:\BuildAgent3\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:192 
  at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in C:\BuildAgent3\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:128 
  at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001f] in C:\BuildAgent3\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\Platform.cs:282 
  at Xamarin.Forms.Platform.Android.Platform.AddChild (Xamarin.Forms.VisualElement view, Boolean layout) [0x00015] in C:\BuildAgent3\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\Platform.cs:518 
  at Xamarin.Forms.Platform.Android.Platform.SetPage (Xamarin.Forms.Page newRoot) [0x00089] in C:\BuildAgent3\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\Platform.cs:406 
  at Xamarin.Forms.Platform.Android.FormsApplicationActivity.InternalSetPage (Xamarin.Forms.Page page) [0x000b7] in C:\BuildAgent3\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\FormsApplicationActivity.cs:286 
  at Xamarin.Forms.Platform.Android.FormsApplicationActivity.SetMainPage () [0x00000] in C:\BuildAgent3\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\FormsApplicationActivity.cs:305 
  at Xamarin.Forms.Platform.Android.FormsApplicationActivity.LoadApplication (Xamarin.Forms.Application application) [0x0002d] in C:\BuildAgent3\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\FormsApplicationActivity.cs:108 
  at EmployeeApp.Droid.MainActivity.OnCreate (Android.OS.Bundle bundle) [0x00036] in C:\Dev\FlexyBook\XamarinApps\EmployeeApp\EmployeeApp\EmployeeApp.Droid\MainActivity.cs:26 }

from xamarin.plugins.

DnyaneshwarWadghanePM avatar DnyaneshwarWadghanePM commented on August 18, 2024

change this following code in your MainActivity
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity

from xamarin.plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.