error.... InitializeComponent () is too complex.

legariolegario Member ✭✭
edited September 2018 in Cross Platform with Xamarin

hi, my app it was working okey, its a TabbedPage with 4 children with photos , buttons and labels .. yesterday I was adding some more code, the same code for all my app but I have this new problem, some body can help my ....
System.InvalidProgramException has been thrown
InitializeComponent () is too complex.

Answers

  • kentuckerkentucker USMember ✭✭✭✭✭

    Could you post the code?

  • ColeXColeX Member, Xamarin Team Xamurai

    Please show us your code and point out which line causes the error.

  • legariolegario Member ✭✭
    edited September 2018
        public MainPage()
        {
    
            InitializeComponent(); here its show the Exception 
    
        }
    

    my code is a tabbed page with four children, in all the children (content Pages) y have at less 20 pictures, each picture has an description and two bottoms, one for geolocation and one for show more photos..(when Im init() the app its to heavy and now complete crashes douwn... :/ I will do one main page and tree more pages to replace the tabbed page, so maybe the app starts more faster and don't crash down... any suggestion?? @ColeX @kentucker

  • kentuckerkentucker USMember ✭✭✭✭✭

    Only suggestion I have is make sure the images the app is displaying are the size they need to be displayed. Resizing the images can take a lot of resources.

  • legariolegario Member ✭✭

    @kentucker All the images are not in resources, Im taking all the pictures from my web when the app init() and the size its around 40KB each image, in Resources only I have my icons images with the specifics sizes

  • legariolegario Member ✭✭

    @kentucker or you say the dimensions???
    may images are 800 × 533px and 45KB each one, and all are in my web.. with resizing the image you mean the (px)??

Sign In or Register to comment.