I have found that while exporting the build for packaging mobile application installer in flash builder, there are some problems with installer packages ( ‘ .apk ‘ ) regarding compatibility with Android version 2.2. The ‘.apk’ extension file created in flash builder 4.5.1 does not install on Android 2.2 devices like Samsung Galaxy S5670 smart phone which runs Android 2.2.
Following error is encountered while installing the application:
If there is a similar problem with other android devices running 2.2 version, here is one solution which I have found and implemented on Samsung Galaxy S5670 smart phone. There is a BATCH file named ‘adt’ which is referred while packaging mobile phone compatible installer for Android platform. All one has to do is to execute a command on a BATCH file (adt.bat) with some additional parameters.
The command which needs to be executed is as follows:
The ‘ .swf ‘ and ‘ .xml ‘ files can be found in source (src) directory in the project in flash builder IDE. You have to either provide the full path of each file at every instance of that file in the command or copy these files in the directory containing the the Batch file on which command is executed. The ‘ .apk ‘ file is the target file name for installer package which is to be created. The file named ‘default’ in this command is the certificate file which can ask for password after the command is successfully executed.
This command will create an installer package ( project_name.apk ) which can be installed on Android 2.2 and all succeeding versions of android emulator (or simulator). The same file can be used for installation on any physical device which is running Android 2.2 Froyo and all succeeding versions of android.
The ‘ .apk ‘ file can be installed on the android emulator or device using following command:
All the commands can be executed on command prompt. The location of the Android Developer Tools (adt) and Android Debug Bridge (adb) commands can be found depending on the locations of their relevant flash builder sdk and android sdk respectively.