problems with flex-config.xml
Hello gradlefx-support team,
in the default config gradlefx is unable to find my
playerglobal.swc (I use the flex-dependency to get flex from
scratch):
.gradle/gradleFx/sdks/298215ddd2158f06b32305aec5cef3547b56b788/frameworks/flex-config.xml(85):
Error: unable to open '{playerglobalHome}/11.1'
But there is such a file in the
frameworks/libs/player/11.1/-directory:
.gradle/gradleFx/sdks/298215ddd2158f06b32305aec5cef3547b56b788/frameworks/libs/player/11.1/playerglobal.swc
I tried to set the swc as parameter in
additionalCompilerOptions, but mxml always also
searches for the one specified in the flex-config.xml and exits
with an error that the file from the flex-config.xml can not be
found.
So my solution is to write my own flex-config.xml and
use
afterEvaluate {
additionalCompilerOptions = ["-load-config=$project.projectDir/flex-config.xml"]
}
in my build.gradle-file to override the
<external-library-path> for the
playerglobal.swc-file.This way I am able to build my flex project, but I have to hardcode the path for the playerglobal.swc.
- Is there a better way to override the
playerglobal.swc-path?
- (if 1. is not possible) How can I template my flex-config.xml using gradlefx to set the path for the playerglobal.swc-file to the currently used flex directory?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | 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
Support Staff 1 Posted by Yennick Trevels on 23 Jul, 2013 12:00 PM
Hi,
It looks like you're using an Apache Flex version, so maybe {playerglobalHome} has been added in their latest release.
I'll see if I can reproduce this and let you know a possible solution.
2 Posted by Andreas on 23 Jul, 2013 02:51 PM
Hi Yennick,
yes, I use
Thank you!
Support Staff 3 Posted by Yennick Trevels on 23 Jul, 2013 05:10 PM
Hi,
I'm not immediately able to reproduce the problem. I tried it with Flex 4.9 on a swc, swf and air project, but they all seem to work it player 11.1.
Can you verify these things for me:
Greetz
4 Posted by Andreas on 23 Jul, 2013 07:50 PM
OK, here is everything you need to reproduce this (I am using fedora 18, downloaded the gradlefx 1.6 binaries from the website, because the gradle-packages in fedora are really old):
i created a small git repo for testing, see: https://github.com/brean/gradlefx-test
Support Staff 5 Posted by Yennick Trevels on 24 Jul, 2013 06:25 AM
Hi, I was able to test your example project on Windows, and it compiles fine. I will have access to a linux machine this evening, and I'll try it again on that one.
In the meantime, can you try to use GradleFx 0.6.4 (the latest release) since there have been made some changes in the latest releases on this topic. I see you're using Gradle 1.6 (the build framework) and GradleFx 0.6 (the Gradle plugin). So you should replace this:
with this
What I also find strange is that it's referencing '{playerglobalHome}' at line 65 of flex-config.xml. But when I look at the flex-config.xml file of the Apache Flex 4.9.0 release it doesn't contain that variable, this variable only started appearing in the flex-config.xml file since Apache Flex 4.9.1.
6 Posted by Andreas on 24 Jul, 2013 07:34 AM
Hi Yennick,
thank you for your efforts!
I tried the flollowing:
1. deleted my local .gradle-directory to let gradle re-download and install the sdk
2. switching to flex 4.9.1
3. changed gradlefx to 0.6.4 (as you suggested)
unfortunately, none of that worked, I always get the same error:
7 Posted by Andreas on 24 Jul, 2013 07:52 AM
HA! GOT IT!
I changed my dependency from .tar.gz to .zip and it is working:
so the .zip for the SDK seems to be the linux & windows version and the .tar.gz is the one only for the mac or is this a real bug behind this that we should file to apache?Support Staff 8 Posted by Yennick Trevels on 24 Jul, 2013 11:11 AM
Nice find! Didn't notice that myself.
It doesn't seem to be a bug, they also indicate it on their download page: http://flex.apache.org/download-binaries.html
Yennick Trevels closed this discussion on 24 Jul, 2013 04:21 PM.