From Flex to GradleFx

Parthasarathy's Avatar


04 Apr, 2016 07:14 AM

<?xml version="1.0" encoding="utf-8"?>
<comp:Resize xmlns:mx=""


Both present in the same directory.

In the build.gradle file I have mentioned it as

compileFlex {
    mainClass= 'Popup.mxml'

However on build am getting an error stating
Error: Unable to locate specified base class '' for component class 'Popup'.

  1. Support Staff 1 Posted by Yennick Trevels on 04 Apr, 2016 07:52 AM

    Yennick Trevels's Avatar


    One issue I see is the way you specify the mainClass. This shouldn't be wrapped into a compileFlex block, but instead can be used without. Also, since both Popup.mxml and Resize.mxml are in the same package (so, this path should also be used in the mainClass definition:

    mainClass = 'com/abc/help/component/Popup.mxml'
  2. 2 Posted by Partha Sarathy on 05 Apr, 2016 07:44 AM

    Partha Sarathy's Avatar

    Hi Yennick,
    Thanks for your reply.

    mainClass = 'com/abc/help/component/Popup.mxml'

    I removed compileFlex block and declared the main class as suggested
    'com/abc/help/component/Popup.mxml'. However its looking for file with name
    'com/abc/help/component/Popup.mxml' instead of Popup.mxml in specified path.
    I have given srcDirs = ['com/abc/help/component','com/abc/help/presentation'
    However nothing is working. If you could please help me.

    Thanks & Regards,
    Parthasarathy K.

  3. Support Staff 3 Posted by Yennick Trevels on 05 Apr, 2016 12:45 PM

    Yennick Trevels's Avatar

    ok, in that case it makes sense that the component Resize can't be found, given your defined srcDirs. The srcDirs should point to the root of your package structure.

    For example, given you have the following directory structure in your project, where "com/abs/help/component" is a package structure containing your class files:


    Then srcDirs should be:

    srcDirs = ['src/main/flex']

    and mainClass should be:

    mainClass = 'com/abc/help/component/Popup.mxml'
  4. 4 Posted by Partha Sarathy on 07 Apr, 2016 07:43 AM

    Partha Sarathy's Avatar

    Hi Yennick,
    Thanks that helped me :)

    Parthasarathy K.

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