Android Question Removing redundant .png file cause complie error.

Discussion in 'Android Questions' started by Roger Daley, Feb 21, 2015.

  1. Roger Daley

    Roger Daley Well-Known Member Licensed User

    Hi All,

    A puzzle!
    I have a number of .png files in the project that are not required. If I remove any of these I get the error below when I try to complie. If I copy them back in to the files folder all is good.
    I have tried using both the Designer "Remove Selected" and the IDE Files "Remove" to remove the files but it still causes the error.
    When I copy the file/s back in to the Files folder I don't need to have either the Designer or the IDE Add the file/s to their respective list, the .png file just needs to be in the Files folder.

    I could ignore them but would prefer to clean out unused files.

    Any help greatly appreciated.

    Regards Roger

    Compile Error.jpg
     
  2. NJDude

    NJDude Expert Licensed User

    Delete the files you don't need and run your code in DEBUG (legacy) mode to see the offending line.
     
    thedesolatesoul and Roger Daley like this.
  3. Roger Daley

    Roger Daley Well-Known Member Licensed User

    Thanks NJDude

    I had tried Debug Rapid, but it didn't find a problem. The Legacy Debug certainly has found the problem at "Activity.LoadLayout("Portrait")" as shown below. Any idea as what I do to fix it, I'm out of my depth.

    Roger

    Compile Error2.jpg
     
  4. NJDude

    NJDude Expert Licensed User

    If you look at the report, there's a panel not initialized, maybe you are adding an image to that panel background?
     
  5. Roger Daley

    Roger Daley Well-Known Member Licensed User

    I think that the panel is logged as not initialized is a different puzzle.
    The "aboutPanel" was created in the Designer and my understanding that this initializes the panel and it should not be initialized in code.
    The about Panel has only 1 Label [Text only, no images]. It causes no problem until I remove a .png file. The .png file not associated with the aboutPanel.
    I did however try initializing the panel in code but the result was the same error. Stanger and stranger.

    Regards Roger
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    You should not initialize views created with the designer. Can you upload your project?
     
    Roger Daley likes this.
  7. Roger Daley

    Roger Daley Well-Known Member Licensed User

    Thanks Erel,

    The project zip is to large to upload directly, but a link is below. I haven't used drop box before, this should work, let me know if it doesn't.
    There are a number of redundant files in the project, removing one, "banner.png" should demonstrate the problem.

    BrownPaper2


    Regards Roger
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice