I created a very simple flex application "HelloWorld.mxml".
<?xml version="1.0" encoding="utf-8"?>
<s:Button label="Hello World!" />
After building the swf file, I try to package it for deployment on my Android tablet.
adt -package -target apk -storetype pkcs12 -keystore newcert.p12 HelloWorld.apk HelloWorld-app.xml HelloWorld.swf
After entering the certificate password I receive this error message:
aapt tool failed: /opt/flexsdk4.6/lib/android/bin/aapt: /opt/flexsdk4.6/lib/android/bin/aapt: cannot execute binary file
Packaging the app in Windows works fine.
My entire flex sdk folder has execution permission.
What could be the problem, or could this be a bug in the newest Flex sdk?
Any updates on this?
We have the same issue. We are compiling and packaging an apk using ANT. The script works fine on Windows, but on our build machine (CentOS), we get this error:
[java] aapt tool failed:/usr/flex/4.6.0/lib/android/bin/aapt: /usr/flex/4.6.0/lib/android/bin/aapt: cannot execute binary file
Flex SDK 4.6.0
The solution that I found for this issue is to download the android sdk for linux,install it, and then grab the aapt file from the platform-tools folder and copy it over the aapt file in lib/android/bin.
Figured it out.
Thanks a lot for your tip. Really helped.