when tried to build a AIR application for android using flex builder I did the following steps to do that .plz tell me where the error happened
1.Created Air application using flex builder that produced two type of files .swf and .xml files and cetification file
2.Created apk file from the above files using "Package assisstant pro"
3.then i installed AIR 2.5 run time in my emulator
4.after that i tried to install the apk file that Created from the 'package assisstant pro' then i tried to install the apk file by using command prompt then it show this error "INSTATTION FAILED INVALLID APK" .And also i cann't install other apk file (Sample air for android application apk file that downloaded from the site) that shows the same error
I succeed to install other application's(Say for printing hello world) apk file
enter code here
package { import flash.display.Sprite; import flash.text.TextField;
public class AndroidAndFlex extends Sprite
{
public function AndroidAndFlex()
{
var textField:TextField = new TextField();
textField.text = "Hello World";
stage.addChild(textField);
}
}
}
xml file
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<id>AndroidAndFlex</id>
<filename>AndroidAndFlex</filename>
<name>AndroidAndFlex</name>
<
<versionNumber>1.0.0</versionNumber>
<initialWindow>
<content>AndroidAndFlex.swf</content>
<visible>true</visible>
</initialWindow>
<supportedProfiles>mobileDevice</supportedProfiles>
<android>
<manifestAdditions>
<![CDATA[
<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-configuration android:reqFiveWayNav="true"/>
<uses-feature android:required="false" android:name="android.hardware.touchscreen.multitouch"/>
<application android:enabled="true">
<activity android:excludeFromRecents="false">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
]]>
</manifestAdditions>
</android>
some body plz help me out
thanks in advance
i believe the problem here is the way you are packaging your project. i don't think serge jespers' package assistant pro software has been recently updated to handle targeting of android-emulator apks, it will only package android (non emulator) apks.
try packaging in manually on the command line using ADT 2.5:
adt -package -target apk-emulator -storetype pkcs12 -keystore MyCert.p12 MyApp.apk MyApp-app.xml MyApp.swf
ADT (AIR Developer Tool) is located in the "bin" folder of the AIR SDK. i assume you're using Windows? if so, it's called "adt.bat" (on Mac and Linux is just called "adt" without an extension). in the command i wrote above, "adt" is the program you want to execute on the command line, while all that follows (-package, -keystore, etc.) are arguments you are passing to ADT.
open your command prompt (cmd.exe). drag "adt.bat" into the command prompt, which will display it's location in quotes. you could also write out its location, but dragging and dropping files is much easier. after that, type -package -target apk-emulator -storetype pkcs12 -keystore
, add a space, then drag your .p12 certificate file into the command prompt to log it's location.
next write the location you want your .apk file. say you want it on your desktop, so you write the file path "Desktop\myEmulatorApp.apk" (without the quotes), add a space and drag and drop both of your MyApp-app.xml and MyApp.swf, separated by a space to log their locations.
when you hit enter, ADT should compile and save myEmulatorApp.apk on to your desktop.
you can read more about installing AIR on mobile devices with ADT here: http://help.adobe.com/en_US/air/build/WSfffb011ac560372f-5d0f4f25128cc9cd0cb-7ff6.html#WS2d929364fa0b81373f5793e012a24c349f8-7fff
if you receive any vague errors messages, you can get a better understanding of the error by looking them up here: http://help.adobe.com/en_US/air/build/WSBE9908A0-8E3A-4329-8ABD-12F2A19AB5E9.html