Trying to build my first ANE


#1

Hello Everyone
I am Gaetano, i am trying to build my first ane and in my build ANT script, after compiling my jar file, i attemp to build the swc file and here is the problem. On this line: arg value="-load-config=${flex.home}/frameworks/air-config.xml" i get this error: [java] defaults: Error: unable to open ‘./themes/Spark/spark.css’ i checked the path and the spark.css is where it should be, do you know how i can solve this problem?
Thanks


#3

Hi Gaetano and welcome to the forum

you need to provide more infos about your setup

top of my head, I would say you are using the Apache Flex SDK
and you may be better off using the AIR SDK and compiler

the error you get

simply indicate a trivial path error, but spark being a flex component
it is strange as you don’t need (or don’t want) to compile flex components into an ANE

but you don’t provide the full path of your build or the build.xml file so hard to say

you can find may ANE sources with builds on Github
check Freshplanet and StickSports

they both use Ant builds
github.com/freshplanet/ANE-KeyboardSize/blob/master/build/build.xml
github.com/StickSports/ANE-Can-Open-URL/blob/master/build/build.xml

there are a lot of different way to organise an ANE project, but their build,xml should help you see what maybe is missing or misconfigured in yours.

further than that …


maybe provide more informations

under which OS: Windows ? macOS ?

which SDK ?

  • Adobe Flex SDK + AIR SDK ?
  • Apache Flex SDK + AIR SDK ?
  • AIR SDK and compiler ?

and which versions of those SDK?
which version of Java? version of Ant?

layout of your files/folders?
source of your build.xml?

Do you follow a tutorial?

etc.


have you looked at

Extending Adobe AIR by Oliver Goldman
https://www.adobe.com/devnet/air/articles/extending-air.html
(this is a must read and best way to start imho)

Developing Native Extensions for ADOBE AIR (PDF)
https://help.adobe.com/en_US/air/extensions/air_extensions.pdf

Developing Native Extensions for ADOBE AIR (online)
https://help.adobe.com/en_US/air/extensions/index.html

you can find many tutorials from Adobe here
Native Extensions for Adobe AIR
https://www.adobe.com/devnet/air/native-extensions-for-air.html
under “Tutorials and articles”


if you prefer long and detailed tutorial look at
Building a native extension for iOS and Android1
https://www.adobe.com/devnet/air/articles/building-ane-ios-android-pt1.html


at the opposite if you prefer short one page tuto see here
Developing Android Extensions for AIR 3: A Beginner’s Guide
https://www.milkmanplugins.com/developing-android-extensions-for-air-3-a-beginners-guide


#4

Hi zwetan, thanks a lot for your reply.
Yes, i am using Adobe Flex SDK but now i guess i will swich to AIR SDK and compiler. I am targeting Android platform in windows 10 OS.
I followed few tutorials around the web and i had a look also at the Freshplanet and StickSports ANEs projects but at the end i implemented another ANT script i found in GItHub from another Ane.
I setup everything and i will let you know if i can figure it out how it works :smile:
Thanks a lot again for the comprehensive reply.