2 Replies Latest reply: Apr 8, 2013 3:16 AM by marco1230 RSS

    Cannot initialize Native Extension

    marco1230

      Hello

       

      i always get an

       

      Type Error #1009 cannot access a property or method of a null object reference

       

       

      It seems that my code cannot load the ANE because I cannot instatiate the extension object.

       

       

      any help?


      Thanks

      Marco

        • 1. Re: Cannot initialize Native Extension
          Jarrod 12345

          Marco,

           

          In the past I've had some issues with the ANE being missing.  First of all, if you haven't already:

           

          1) Go to project settings and check that the ANE is included in your build packaging (if you don't have build packaging in your project's options, you're making a web flash target, which does not support native extensions)

          2) Go to project settings and check that the ANE is included in your build path.

          2) Check that the platform you are targetting has it's initializer set in the extension.xml file that is used to package the ANE.  If you didn't package the ANE yourself I believe you can rename the .ane to a .zip and have a look at the configuration yourself using a zip file viewer.  If the platform is not supported, you will need to do this first.

           

          If everything seems right you might need to build your project from scratch.  From memory, I've had things mysteriously work again after a rebuild, or after removing ANEs and reinserting them.

           

          That's all I can think of, of the top of my head.  Hope it helps

           

          Cheers,

           

          Jarrod

          • 2. Re: Cannot initialize Native Extension
            marco1230 Community Member

            thank you very much, the ANE is now working. One question still open: do I need to add the Actionsscript library SWC File also into my final flex mobile projects or not?

             

            Thanks

            Marco