1
votes

I just added the newest SDK of Apache Flex (4.12.1), as3corelib, OSMF and playerglobal14_0 to my library and and setup a simple Flash "Hello World"-project (default). The code inspection shows no errors whatsoever. I am working with IntelliJ IDEA 13.1.3 on Ubuntu 14.04 LTS

However, compiling with the built-in shell fails with

Error:[TestFlex]: java.net.SocketTimeoutException: Accept timed out
Error:[TestFlex]: Exception in thread "main" 
Error:[TestFlex]: java.lang.NoClassDefFoundError: flex2/tools/VersionInfo
  at com.intellij.flex.compiler.FlexCompiler.<clinit>(FlexCompiler.java:19)
Caused by: java.lang.ClassNotFoundException: flex2.tools.VersionInfo
  at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
  at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
  ... 1 more

Compiling with Mxml/compc fails with

Error:[TestFlex]: Could not find or load main class flex2.tools.Mxmlc

Any ideas?

2

2 Answers

1
votes

I can give you some information about where to start looking for the problem, which is possibly an incomplete installation of the SDK on your system.

Both of the missing classes you mention are in mxmlc.jar, and IntelliJ IDEA expects to find mxmlc.jar in the sdk/lib folder. If mxmlc.jar is missing, you would see this error:

java.lang.NoClassDefFoundError: flex2/tools/VersionInfo

Using the Apache Flex SDK Installer, you can be assured of a complete copy of the SDK:

http://flex.apache.org/installer.html

IntelliJ IDEA looks in the Flex/AIR SDK home path you have specified under Platform Settings-->SDKs in your Project Structure. The Project Structure UI is under the File menu in IntelliJ IDEA.

IntelliJ documentation site regarding project SDKs:

https://www.jetbrains.com/idea/help/configuring-global-project-and-module-sdks.html

0
votes

I just encountered the same error, when trying to compile with AIR 16 Beta in this configuration:

  1. IDEA 14 64 Bit
  2. apache Flex 4.13
  3. AIR 16 Beta.
  4. Windows 7, 64 Bit

AIR 15 I had different problems with AIR15; most probably a heap size issue that I could not fix yet. The error is:

Failed to package AIR application xxxxx.ipa: Undefined symbols for architecture armv7

AIR 14 No problems with AIR 14 (same Flex and IDEA version)

Any idea??