Could not compile mobile applications because ANE are not recognized

Pablo Lamberti's Avatar

Pablo Lamberti

29 Jun, 2017 04:12 PM

Hi everyone

I have this flex mobile application and I can't make it compile.

When i execute "gradle compileFlex" i got the error

Definition ie.jampot.nativeExtensions:MobileBackup could not be found.

turn that this class came from a ANE that I put in a directory and also I defined the extensionDir as shown

airMobile { extensionDir = 'src/main/extensions' platform = 'ios' target = 'ipa-debug' }

Can someone exaplin what am I doing wrong...


  1. Support Staff 1 Posted by Yennick Trevels on 29 Jun, 2017 07:37 PM

    Yennick Trevels's Avatar

    Your code snipped looks ok.

    When using ANE's you also have to declare them in your application descriptor file:


    For more info see Adobe's documentation:

  2. 2 Posted by Pablo Lamberti on 29 Jun, 2017 07:53 PM

    Pablo Lamberti's Avatar


    Sure I did declare them on the app.xml file!

    I have five ANE's and no one are recognized

  3. Support Staff 3 Posted by Yennick Trevels on 02 Jul, 2017 11:44 AM

    Yennick Trevels's Avatar

    "extensionDir" is used during the packaging phase by adt. However, during the compilation phase the mxmlc/compc compiler also needs to know the class. Therefore you also have to specify it as a dependency (notice the 'ext' property):

    dependencies {
       external group: 'org.mycompany', name: 'myane', version: '1.0', ext: 'ane'
  4. 4 Posted by Pablo Lamberti on 03 Jul, 2017 08:24 PM

    Pablo Lamberti's Avatar

    It make sense!

    But from where does gradle resolve the dependencies?

    Do I need to upload the ane files to a binaries repository?

  5. Support Staff 5 Posted by Yennick Trevels on 03 Jul, 2017 08:53 PM

    Yennick Trevels's Avatar

    by default Grade will pull the dependencies from a remote ivy/maven repository.
    However, you can also define file-based dependencies which resolve to a file in your project folder.

  6. 6 Posted by Pablo Lamberti on 03 Jul, 2017 09:17 PM

    Pablo Lamberti's Avatar

    It worked!

    I uploaded the ane files to my company binaries repository

    now it worked! Thanks

    BTW, i hace another problem but i will start a different topic

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac