3 Replies Latest reply on Jun 10, 2011 10:26 AM by Phoenix_Guru

    Compilation errors are being cached??

    Phoenix_Guru Level 1

      Hi,

       

      I am having a hard time getting rid of some cached compilation errors, that don't really exist. I am doing clean builds of the project and there are no errors, till the build reaches 100%. After 100% it throws 23 errors all of a sudden. The errors are actually non existing. Examples are:

       

      Invalid Embed directive in stylesheet - can't resolve source 'Embed("../assets/images/addBtn.png")'.

       

      1119: Access of possibly undefined property includeInLayout through a reference with static type com.xxx.xxx.xxx.xxx.view.component:MyProgressBar.

       

      Both the errors are vague as the button image is present in the given location and also the MyProgressBar component is having the includeInLayout property. I can see it through content assist.

       

      I have been getting these errors earlier as well but they used to get resolved if I do a Clean Build. This time they are not going at all.

       

      After some directions, I also tried deleting .markers file, but it didn't help.

       

      Please help me out!!

       

      Thanks,

      Saurabh

        • 1. Re: Compilation errors are being cached??
          EvyatarBH

          Check the syntax of the Embed request and verify you can use a static reference to that property.

           

          Note the difference between -

           

          MyProgressBar.includeInLayout

           

          and -

           

          var progressBar:MyProgressBar = new MyProgressBar();

          progressBar.includeInLayout

           

          It also might be an import issue, meaning you are trying to use MyProgressBar without the line -

          import com.xxx.xxx.xxx.MyProgressBar;

           

          I don't think compilation errors are being cached and they normally have a good reason for them.

          I strongly suggest to identify the root cause of the errors and fix the problematic issues.

          • 2. Re: Compilation errors are being cached??
            Phoenix_Guru Level 1

            I am able to access the file with the same path manually. The property error is vague, its just a control in the same file, also I can access it at all other places the same way and this code has been live for more than 2 years.

             

            Its just MXML component that would have it for sure. I can see it in content assist too.

             

            As I said, there is actually no error and this usually comes sometimes and goes away if I do a clean build. Its just this time it isn't going away..

             

             

            Thanks!

            • 3. Re: Compilation errors are being cached??
              Phoenix_Guru Level 1

              The issue got resolved by itself. I added some dummy type casting code in one of the files where error was appearing. After a build, the error got resolved and then I reverted the code and did a build again! Voila!!

               

              Thanks for help!!