Skip to main content
Inspiring
June 23, 2014
Answered

Error occurred while packaging the application: Android-x86

  • June 23, 2014
  • 2 replies
  • 8078 views

Hello,

I tried to export an existing Android-ARM to Android-x86:

This application uses to 2 ANE for In-App purchases. One for iOS and another one for Android. I repackaged the Android ANE file to be compatible with Android-x86 and I also add the new Flash Builder "-arch" with value "x86" and place it before "-storetype".

Error occurred while packaging the application:

output file is not writable

usage:

  adt -checkstore SIGNING_OPTIONS

  adt -certificate -cn <name> ( -ou <org-unit> )? ( -o <org-name> )? ( -c <country> )? ( -validityPeriod <years> )? ( 1024-RSA | 2048-RSA ) <pfx-file> <password>

  adt -help

  adt -migrate SIGNING_OPTIONS ( <air-file-in> | <airn-file-in> ) <output-file>

  adt -package SIGNING_OPTIONS ( -target air )? <output-package> ( <app-desc> FILE_OPTIONS | <input-package> )

  adt -package SIGNING_OPTIONS -target airn <output-package> ( <app-desc> FILE-AND-PATH-OPTIONS | <input-package> )

  adt -package -target ( apk | apk-debug | apk-emulator | apk-captive-runtime ) ( CONNECT_OPTIONS? | LISTEN_OPTIONS? ) ( -airDownloadURL <url> )? ( ARCH_OPTIONS )? SIGNING_OPTIONS <output-package> ( <app-desc> PLATFORM-SDK-OPTION? FILE-AND-PATH-OPTIONS | <input-package> PLATFORM-SDK-OPTION? )

  adt -package -target ( ipa-test | ipa-debug | ipa-app-store | ipa-ad-hoc | ipa-test-interpreter | ipa-debug-interpreter | ipa-test-interpreter-simulator | ipa-debug-interpreter-simulator ) ( CONNECT_OPTIONS? | LISTEN_OPTIONS? ) ( -sampler )? ANE_LINK_OPTIONS? AOT_MODE_OPTIONS? SIGNING_OPTIONS <output-package> ( <app-desc> PLATFORM-SDK-OPTION? FILE-AND-PATH-OPTIONS | <input-package> PLATFORM-SDK-OPTION? )

  adt -package SIGNING_OPTIONS? -target native SIGNING_OPTIONS? <output-package> ( <app-desc> FILE-AND-PATH-OPTIONS | <input-package> )

  adt -package SIGNING_OPTIONS? -migrate SIGNING_OPTIONS -target native SIGNING_OPTIONS? <output-package> <app-desc> FILE_OPTIONS PATH-OPTION

  adt -package SIGNING_OPTIONS? -target bundle SIGNING_OPTIONS? <output-package> ( <app-desc> FILE-AND-PATH-OPTIONS | <input-package> )

  adt -package SIGNING_OPTIONS? -target ane <output-package> <ext-desc> ANE_OPTIONS

  adt -prepare <airi-file> <app-desc> FILE_AND_PATH_OPTIONS

  adt -sign SIGNING_OPTIONS ( -target ( air | airn | ane ) )? ( <airi-file> | <unsigned-ane-file> ) <output-file>

  adt -devices          PLATFORM-OPTION PLATFORM-SDK-OPTION?

  adt -installRuntime   PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION? ( -package <apk-file> )?

  adt -installApp       PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION? -package <apk-file | ipa-file>

  adt -uninstallRuntime PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION?

  adt -uninstallApp     PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION? -appid <app-id>

  adt -launchApp        { PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION? ( -debuggerPort port )? -appid <app-id> }

  adt -runtimeVersion   PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION?

  adt -appVersion       PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION? -appid <app-id>

  adt -version

SIGNING_OPTIONS      : -storetype <type> ( -keystore <store> )? ( -storepass <pass> )? ( -alias <aliasName> )? ( -keypass <pass> )? ( -providerName <name> )? ( -tsa <url> )? ( -provisioning-profile <profile> )?

FILE_OPTIONS         : <fileOrDir>* ( ( -C <dir> <fileOrDir>+ ) | ( -e <file> <path> ) )*

ARCH_OPTIONS        : -arch (armv7 | x86)

CONNECT_OPTIONS      : -connect <host>

LISTEN_OPTIONS       : -listen <port>

ANE_LINK_OPTIONS     : -hideAneLibSymbols ( yes | no )

ANE_OPTIONS          : -swc <swc> ( -platform <name> (-platformoptions <file>)? <fileOrDir>* ( -C <dir> <fileOrDir>+ )* )*

FILE-AND-PATH-OPTIONS: ( PATH-OPTION | FILE-OPTIONS ) FILE-AND-PATH-OPTIONS?

PATH-OPTION          : -extdir <dir>

PLATFORM-OPTION      : -platform (android | ios)

PLATFORM-SDK-OPTION  : -platformsdk <platform-sdk-home-dir>

DEVICE-OPTION        : -device ( deviceID | ios-simulator )

AOT_MODE_OPTIONS     : -useLegacyAOT ( yes | no )

This topic has been closed for replies.
Correct answer Nimisha1

Hi Nimisha1,

I tried with both AIR 14.0 final release and also 14.0.125.

I have a Mac (last version OS).

With -arch armv7 I got the same error !

With command line works !

See the screenshoot of FB 4.7 customize launch:

See the screenshoot of FB export error:


Hi,

I am able to repro the bug if I edit the "APPLICATION" parameter while packaging the apk and change it to "somedirectory/helloworld.apk" from "helloworld.apk". So a quick workaround would be to remove whole directory path and simple make APPLICATION parameter value "helloworld.apk" when packaging with -arch argument.

Also there is a known issue with FB4.7 that it fails to install APK on Android device when packaged with -arch option on exporting release build. So always choose option "Keep bin-release-temp folder" which will keep APK even if FB fails to install/launch it on the device.

-Nimisha

2 replies

Herado__
Inspiring
April 17, 2020

What worked for me with FB on Mac, when using the Harman AIR33.1 SDK to compile an Android app with -arch armv8 was to enter the full directory path and filename.apk

Participant
May 22, 2020

Thank you!  This was the last missing piece I needed, and now I finally was able to meet the 64-bit requirement.

Colin Holgate
Inspiring
June 24, 2014

I saw a few ADT errors in the last day or two, and I spotted something important in them, which has helped me a lot in tracking down the real issue.

You just posted all the things that ADT can do, but maybe didn’t notice that one important line:

"output file is not writable”

So, it doesn’t matter what the long list of other things that you might have got wrong is, it appears that for some reason the output file couldn’t be written. Check to see where the file is being written to, and if that folder has write permissions.

Inspiring
June 24, 2014

Hello Colin,

Yes, I notice that line too.

The build location is the desktop and if I simply remove the "-arch x86" to build to the ARM architecture then the errors goes away.

Maybe it's related with a new tempo file required with the x86 compilation!

Inspiring
June 24, 2014

I tried again with a new project (Simple hello world) and without any ANE and I got the same error !

Any one is using FB 4.7 + AIR 14 + Android x86 (I doubt) !?

I also tried in both AIR 14.0 and the new beta and also in Mac and Windows environment !

I'm completely out of ideas and IT seems that this was not well tested with FB on my opinion.