Air for Android App
-
Upload
saurabhd134123 -
Category
Documents
-
view
224 -
download
0
Transcript of Air for Android App
-
8/8/2019 Air for Android App
1/12
AIR FOR ANDROID APPLICATION USING FLASH BUILDER
PROCEDURE TO INTERGRATE THE AIR FOR ANDROID:
1. Download the Air SDK 2.5, Android SDK 2.2, Runtime Emulator.apk.
Download Links:
http://developer.android.com/sdk/index.html(Android sdk only)
http://labs.adobe.com/technologies/air2/android/(both runtime emulator.apk and AIR
sdk)
2. After downloading the sdks, we must set the path in environment variables.
For Example:
The goal is to add a couple of directories to the list so that the command programcan find the ADT tool from the AIR SDK and the ADB tool from the Android SDK.
Assuming that you have put the AIR SDK at C:\SDKs\AIR and the Android SDK at C:\
SDKs\android, you can add the proper path entries with the following procedure:
1. Open the System Properties dialog by right-clicking on the My Computer icon and
choosing Properties from the menu.
2. Under the Advanced tab, click the Environment Variablesbutton.
3. Select the Path entry in the System variables section of the Environment Variablesdialog
4. ClickEdit.
5. Scroll to the end of the text in the Variable value field.
6. Enter the following text at the very end of the current value:
;C:\flexpath\SDKs\AIR\bin;C:\androidpath\SDKs\Android\tools
7. ClickOKin all the dialogs to save the path.
If you have any command windows open, realize that their environments are notupdated. Open a new command window and type the following commands to make sure
the paths are set up correctly:
In Command Prompt Window type this,
adt -version
adb devices
If you later change the location of the SDKs, or add a new version, remember to update
the path variable.
http://developer.android.com/sdk/index.html%5C(Android)%3E%3E%3E%3Eendobj56%200%20obj%3C%3C/Type/Annot/Subtype/Link/Border[0%200%200]/Rect[126.9%20583.5%20386.3%20597.3]/A%3C%3C/Type/Action/S/URI/URI(http://labs.adobe.com/technologies/air2/android/%5C(both)%3E%3E%3E%3Eendobj57%200%20obj%3C%3C/Type/Annot/Subtype/Link/Border[0%200%200]/Rect[110%20569.7%20150.1%20583.5]/A%3C%3C/Type/Action/S/URI/URI(http://labs.adobe.com/technologies/air2/android/)%3E%3E%3E%3Eendobj58%200%20obj%3C%3C/Type/Annot/Subtype/Link/Border[0%200%200]/Rect[384.9%20583.5%20556.1%20597.3]/A%3C%3C/Type/Action/S/URI/URI(http://labs.adobe.com/technologies/air2/android/)%3E%3E%3E%3Eendobj59%200%20obj%3C%3C/Type/Annot/Subtype/Link/Border[0%200%200]/Rect[385.7%20611.1%20435.2%20624.9]/A%3C%3C/Type/Action/S/URI/URI(http://developer.android.com/sdk/index.html)%3E%3E%3E%3Eendobj88%200%20obj%3C%3C/Type/Catalog/Pages%2060%200%20R/OpenAction[1%200%20R%20/XYZ%20null%20null%200]/Lang(en-US)%3E%3Eendobj89%200%20obj%3C%3C/Author%3CFEFF004300610072006F007400650063006800730020004300610072006F%3E/Creator%3CFEFF005700720069007400650072%3E/Producer%3CFEFF004F00700065006E004F00660066006900630065002E006F0072006700200033002E0030%3E/CreationDate(D:20100908151751+05'30')%3E%3Eendobjxref0%20900000000000%2065535%20f%200000410290%2000000%20n%200000000019%2000000%20n%200000002379%2000000%20n%200000410480%2000000%20n%200000002400%2000000%20n%200000003370%2000000%20n%200000013056%2000000%20n%200000003390%2000000%20n%200000013035%2000000%20n%200000410624%2000000%20n%200000039908%2000000%20n%200000041042%2000000%20n%200000041064%2000000%20n%200000410770%2000000%20n%200000087251%2000000%20n%200000088118%2000000%20n%200000088139%2000000%20n%200000103768%2000000%20n%200000410916%2000000%20n%200000103791%2000000%20n%200000104297%2000000%20n%200000112174%2000000%20n%200000104318%2000000%20n%200000112152%2000000%20n%200000411062%2000000%20n%200000134257%2000000%20n%200000135487%2000000%20n%200000135509%2000000%20n%200000411233%2000000%20n%200000158446%2000000%20n%200000159292%2000000%20n%200000159313%2000000%20n%200000193812%2000000%20n%200000411379%2000000%20n%200000193835%2000000%20n%200000194268%2000000%20n%200000194289%2000000%20n%200000234724%2000000%20n%200000411525%2000000%20n%200000234747%2000000%20n%200000237353%2000000%20n%200000411671%2000000%20n%200000237375%2000000%20n%200000239483%2000000%20n%200000411817%2000000%20n%200000239505%2000000%20n%200000241158%2000000%20n%200000241180%2000000%20n%200000411963%2000000%20n%200000259429%2000000%20n%200000260526%2000000%20n%200000260548%2000000%20n%200000412286%2000000%20n%200000412457%2000000%20n%200000412628%2000000%20n%200000412801%2000000%20n%200000412978%2000000%20n%200000413145%2000000%20n%200000413314%2000000%20n%200000412109%2000000%20n%200000302776%2000000%20n%200000331873%2000000%20n%200000331896%2000000%20n%200000332100%2000000%20n%200000332675%2000000%20n%200000333106%2000000%20n%200000372903%2000000%20n%200000372926%2000000%20n%200000373125%2000000%20n%200000373773%2000000%20n%200000374271%2000000%20n%200000392367%2000000%20n%200000392390%2000000%20n%200000392577%2000000%20n%200000393161%2000000%20n%200000393581%2000000%20n%200000401002%2000000%20n%200000401024%2000000%20n%200000401216%2000000%20n%200000401610%2000000%20n%200000401859%2000000%20n%200000409099%2000000%20n%200000409121%2000000%20n%200000409317%2000000%20n%200000409731%2000000%20n%200000409999%2000000%20n%200000410072%2000000%20n%200000413478%2000000%20n%200000413576%2000000%20n%20trailer%3C%3C/Size%2090/Root%2088%200%20R/Info%2089%200%20R/ID%20[%20%3C715CEBD6611A6CD6AF7BC5DE200347A4%3E%3C715CEBD6611A6CD6AF7BC5DE200347A4%3E%20]/DocChecksum%20/A9FA924BF974248D1C3185D7CB7FDF1B%3E%3Estartxref413833%%EOFhttp://developer.android.com/sdk/index.htmlhttp://labs.adobe.com/technologies/air2/android/%5C(both)%3E%3E%3E%3Eendobj57%200%20obj%3C%3C/Type/Annot/Subtype/Link/Border[0%200%200]/Rect[110%20569.7%20150.1%20583.5]/A%3C%3C/Type/Action/S/URI/URI(http://labs.adobe.com/technologies/air2/android/)%3E%3E%3E%3Eendobj58%200%20obj%3C%3C/Type/Annot/Subtype/Link/Border[0%200%200]/Rect[384.9%20583.5%20556.1%20597.3]/A%3C%3C/Type/Action/S/URI/URI(http://labs.adobe.com/technologies/air2/android/)%3E%3E%3E%3Eendobj59%200%20obj%3C%3C/Type/Annot/Subtype/Link/Border[0%200%200]/Rect[385.7%20611.1%20435.2%20624.9]/A%3C%3C/Type/Action/S/URI/URI(http://developer.android.com/sdk/index.html)%3E%3E%3E%3Eendobj88%200%20obj%3C%3C/Type/Catalog/Pages%2060%200%20R/OpenAction[1%200%20R%20/XYZ%20null%20null%200]/Lang(en-US)%3E%3Eendobj89%200%20obj%3C%3C/Author%3CFEFF004300610072006F007400650063006800730020004300610072006F%3E/Creator%3CFEFF005700720069007400650072%3E/Producer%3CFEFF004F00700065006E004F00660066006900630065002E006F0072006700200033002E0030%3E/CreationDate(D:20100908151751+05'30')%3E%3Eendobjxref0%20900000000000%2065535%20f%200000410290%2000000%20n%200000000019%2000000%20n%200000002379%2000000%20n%200000410480%2000000%20n%200000002400%2000000%20n%200000003370%2000000%20n%200000013056%2000000%20n%200000003390%2000000%20n%200000013035%2000000%20n%200000410624%2000000%20n%200000039908%2000000%20n%200000041042%2000000%20n%200000041064%2000000%20n%200000410770%2000000%20n%200000087251%2000000%20n%200000088118%2000000%20n%200000088139%2000000%20n%200000103768%2000000%20n%200000410916%2000000%20n%200000103791%2000000%20n%200000104297%2000000%20n%200000112174%2000000%20n%200000104318%2000000%20n%200000112152%2000000%20n%200000411062%2000000%20n%200000134257%2000000%20n%200000135487%2000000%20n%200000135509%2000000%20n%200000411233%2000000%20n%200000158446%2000000%20n%200000159292%2000000%20n%200000159313%2000000%20n%200000193812%2000000%20n%200000411379%2000000%20n%200000193835%2000000%20n%200000194268%2000000%20n%200000194289%2000000%20n%200000234724%2000000%20n%200000411525%2000000%20n%200000234747%2000000%20n%200000237353%2000000%20n%200000411671%2000000%20n%200000237375%2000000%20n%200000239483%2000000%20n%200000411817%2000000%20n%200000239505%2000000%20n%200000241158%2000000%20n%200000241180%2000000%20n%200000411963%2000000%20n%200000259429%2000000%20n%200000260526%2000000%20n%200000260548%2000000%20n%200000412286%2000000%20n%200000412457%2000000%20n%200000412628%2000000%20n%200000412801%2000000%20n%200000412978%2000000%20n%200000413145%2000000%20n%200000413314%2000000%20n%200000412109%2000000%20n%200000302776%2000000%20n%200000331873%2000000%20n%200000331896%2000000%20n%200000332100%2000000%20n%200000332675%2000000%20n%200000333106%2000000%20n%200000372903%2000000%20n%200000372926%2000000%20n%200000373125%2000000%20n%200000373773%2000000%20n%200000374271%2000000%20n%200000392367%2000000%20n%200000392390%2000000%20n%200000392577%2000000%20n%200000393161%2000000%20n%200000393581%2000000%20n%200000401002%2000000%20n%200000401024%2000000%20n%200000401216%2000000%20n%200000401610%2000000%20n%200000401859%2000000%20n%200000409099%2000000%20n%200000409121%2000000%20n%200000409317%2000000%20n%200000409731%2000000%20n%200000409999%2000000%20n%200000410072%2000000%20n%200000413478%2000000%20n%200000413576%2000000%20n%20trailer%3C%3C/Size%2090/Root%2088%200%20R/Info%2089%200%20R/ID%20[%20%3C715CEBD6611A6CD6AF7BC5DE200347A4%3E%3C715CEBD6611A6CD6AF7BC5DE200347A4%3E%20]/DocChecksum%20/A9FA924BF974248D1C3185D7CB7FDF1B%3E%3Estartxref413833%%EOFhttp://labs.adobe.com/technologies/air2/android/http://labs.adobe.com/technologies/air2/android/http://developer.android.com/sdk/index.htmlhttp://labs.adobe.com/technologies/air2/android/http://labs.adobe.com/technologies/air2/android/http://labs.adobe.com/technologies/air2/android/%5C(both)%3E%3E%3E%3Eendobj57%200%20obj%3C%3C/Type/Annot/Subtype/Link/Border[0%200%200]/Rect[110%20569.7%20150.1%20583.5]/A%3C%3C/Type/Action/S/URI/URI(http://labs.adobe.com/technologies/air2/android/)%3E%3E%3E%3Eendobj58%200%20obj%3C%3C/Type/Annot/Subtype/Link/Border[0%200%200]/Rect[384.9%20583.5%20556.1%20597.3]/A%3C%3C/Type/Action/S/URI/URI(http://labs.adobe.com/technologies/air2/android/)%3E%3E%3E%3Eendobj59%200%20obj%3C%3C/Type/Annot/Subtype/Link/Border[0%200%200]/Rect[385.7%20611.1%20435.2%20624.9]/A%3C%3C/Type/Action/S/URI/URI(http://developer.android.com/sdk/index.html)%3E%3E%3E%3Eendobj88%200%20obj%3C%3C/Type/Catalog/Pages%2060%200%20R/OpenAction[1%200%20R%20/XYZ%20null%20null%200]/Lang(en-US)%3E%3Eendobj89%200%20obj%3C%3C/Author%3CFEFF004300610072006F007400650063006800730020004300610072006F%3E/Creator%3CFEFF005700720069007400650072%3E/Producer%3CFEFF004F00700065006E004F00660066006900630065002E006F0072006700200033002E0030%3E/CreationDate(D:20100908151751+05'30')%3E%3Eendobjxref0%20900000000000%2065535%20f%200000410290%2000000%20n%200000000019%2000000%20n%200000002379%2000000%20n%200000410480%2000000%20n%200000002400%2000000%20n%200000003370%2000000%20n%200000013056%2000000%20n%200000003390%2000000%20n%200000013035%2000000%20n%200000410624%2000000%20n%200000039908%2000000%20n%200000041042%2000000%20n%200000041064%2000000%20n%200000410770%2000000%20n%200000087251%2000000%20n%200000088118%2000000%20n%200000088139%2000000%20n%200000103768%2000000%20n%200000410916%2000000%20n%200000103791%2000000%20n%200000104297%2000000%20n%200000112174%2000000%20n%200000104318%2000000%20n%200000112152%2000000%20n%200000411062%2000000%20n%200000134257%2000000%20n%200000135487%2000000%20n%200000135509%2000000%20n%200000411233%2000000%20n%200000158446%2000000%20n%200000159292%2000000%20n%200000159313%2000000%20n%200000193812%2000000%20n%200000411379%2000000%20n%200000193835%2000000%20n%200000194268%2000000%20n%200000194289%2000000%20n%200000234724%2000000%20n%200000411525%2000000%20n%200000234747%2000000%20n%200000237353%2000000%20n%200000411671%2000000%20n%200000237375%2000000%20n%200000239483%2000000%20n%200000411817%2000000%20n%200000239505%2000000%20n%200000241158%2000000%20n%200000241180%2000000%20n%200000411963%2000000%20n%200000259429%2000000%20n%200000260526%2000000%20n%200000260548%2000000%20n%200000412286%2000000%20n%200000412457%2000000%20n%200000412628%2000000%20n%200000412801%2000000%20n%200000412978%2000000%20n%200000413145%2000000%20n%200000413314%2000000%20n%200000412109%2000000%20n%200000302776%2000000%20n%200000331873%2000000%20n%200000331896%2000000%20n%200000332100%2000000%20n%200000332675%2000000%20n%200000333106%2000000%20n%200000372903%2000000%20n%200000372926%2000000%20n%200000373125%2000000%20n%200000373773%2000000%20n%200000374271%2000000%20n%200000392367%2000000%20n%200000392390%2000000%20n%200000392577%2000000%20n%200000393161%2000000%20n%200000393581%2000000%20n%200000401002%2000000%20n%200000401024%2000000%20n%200000401216%2000000%20n%200000401610%2000000%20n%200000401859%2000000%20n%200000409099%2000000%20n%200000409121%2000000%20n%200000409317%2000000%20n%200000409731%2000000%20n%200000409999%2000000%20n%200000410072%2000000%20n%200000413478%2000000%20n%200000413576%2000000%20n%20trailer%3C%3C/Size%2090/Root%2088%200%20R/Info%2089%200%20R/ID%20[%20%3C715CEBD6611A6CD6AF7BC5DE200347A4%3E%3C715CEBD6611A6CD6AF7BC5DE200347A4%3E%20]/DocChecksum%20/A9FA924BF974248D1C3185D7CB7FDF1B%3E%3Estartxref413833%%EOFhttp://developer.android.com/sdk/index.html%5C(Android)%3E%3E%3E%3Eendobj56%200%20obj%3C%3C/Type/Annot/Subtype/Link/Border[0%200%200]/Rect[126.9%20583.5%20386.3%20597.3]/A%3C%3C/Type/Action/S/URI/URI(http://labs.adobe.com/technologies/air2/android/%5C(both)%3E%3E%3E%3Eendobj57%200%20obj%3C%3C/Type/Annot/Subtype/Link/Border[0%200%200]/Rect[110%20569.7%20150.1%20583.5]/A%3C%3C/Type/Action/S/URI/URI(http://labs.adobe.com/technologies/air2/android/)%3E%3E%3E%3Eendobj58%200%20obj%3C%3C/Type/Annot/Subtype/Link/Border[0%200%200]/Rect[384.9%20583.5%20556.1%20597.3]/A%3C%3C/Type/Action/S/URI/URI(http://labs.adobe.com/technologies/air2/android/)%3E%3E%3E%3Eendobj59%200%20obj%3C%3C/Type/Annot/Subtype/Link/Border[0%200%200]/Rect[385.7%20611.1%20435.2%20624.9]/A%3C%3C/Type/Action/S/URI/URI(http://developer.android.com/sdk/index.html)%3E%3E%3E%3Eendobj88%200%20obj%3C%3C/Type/Catalog/Pages%2060%200%20R/OpenAction[1%200%20R%20/XYZ%20null%20null%200]/Lang(en-US)%3E%3Eendobj89%200%20obj%3C%3C/Author%3CFEFF004300610072006F007400650063006800730020004300610072006F%3E/Creator%3CFEFF005700720069007400650072%3E/Producer%3CFEFF004F00700065006E004F00660066006900630065002E006F0072006700200033002E0030%3E/CreationDate(D:20100908151751+05'30')%3E%3Eendobjxref0%20900000000000%2065535%20f%200000410290%2000000%20n%200000000019%2000000%20n%200000002379%2000000%20n%200000410480%2000000%20n%200000002400%2000000%20n%200000003370%2000000%20n%200000013056%2000000%20n%200000003390%2000000%20n%200000013035%2000000%20n%200000410624%2000000%20n%200000039908%2000000%20n%200000041042%2000000%20n%200000041064%2000000%20n%200000410770%2000000%20n%200000087251%2000000%20n%200000088118%2000000%20n%200000088139%2000000%20n%200000103768%2000000%20n%200000410916%2000000%20n%200000103791%2000000%20n%200000104297%2000000%20n%200000112174%2000000%20n%200000104318%2000000%20n%200000112152%2000000%20n%200000411062%2000000%20n%200000134257%2000000%20n%200000135487%2000000%20n%200000135509%2000000%20n%200000411233%2000000%20n%200000158446%2000000%20n%200000159292%2000000%20n%200000159313%2000000%20n%200000193812%2000000%20n%200000411379%2000000%20n%200000193835%2000000%20n%200000194268%2000000%20n%200000194289%2000000%20n%200000234724%2000000%20n%200000411525%2000000%20n%200000234747%2000000%20n%200000237353%2000000%20n%200000411671%2000000%20n%200000237375%2000000%20n%200000239483%2000000%20n%200000411817%2000000%20n%200000239505%2000000%20n%200000241158%2000000%20n%200000241180%2000000%20n%200000411963%2000000%20n%200000259429%2000000%20n%200000260526%2000000%20n%200000260548%2000000%20n%200000412286%2000000%20n%200000412457%2000000%20n%200000412628%2000000%20n%200000412801%2000000%20n%200000412978%2000000%20n%200000413145%2000000%20n%200000413314%2000000%20n%200000412109%2000000%20n%200000302776%2000000%20n%200000331873%2000000%20n%200000331896%2000000%20n%200000332100%2000000%20n%200000332675%2000000%20n%200000333106%2000000%20n%200000372903%2000000%20n%200000372926%2000000%20n%200000373125%2000000%20n%200000373773%2000000%20n%200000374271%2000000%20n%200000392367%2000000%20n%200000392390%2000000%20n%200000392577%2000000%20n%200000393161%2000000%20n%200000393581%2000000%20n%200000401002%2000000%20n%200000401024%2000000%20n%200000401216%2000000%20n%200000401610%2000000%20n%200000401859%2000000%20n%200000409099%2000000%20n%200000409121%2000000%20n%200000409317%2000000%20n%200000409731%2000000%20n%200000409999%2000000%20n%200000410072%2000000%20n%200000413478%2000000%20n%200000413576%2000000%20n%20trailer%3C%3C/Size%2090/Root%2088%200%20R/Info%2089%200%20R/ID%20[%20%3C715CEBD6611A6CD6AF7BC5DE200347A4%3E%3C715CEBD6611A6CD6AF7BC5DE200347A4%3E%20]/DocChecksum%20/A9FA924BF974248D1C3185D7CB7FDF1B%3E%3Estartxref413833%%EOF -
8/8/2019 Air for Android App
2/12
Android Part:
3. Open the extracted Android sdk location.
4. Run SDK Setup.exe (or the equivalent for your system)
a. If you receive an error message stating Failed to fetch url then you will have to force
the Setup program to use http in lieu of https.
i. Close the Refresh Sources window
Ii. Cancel the Choose Packages to Install window
iii. Select Settings from the left side of the Android SDK and AVD Manager
window
-
8/8/2019 Air for Android App
3/12
iv. Check the box labeled Force https:// sources to be fetched using http://
v. Click Save and Apply
vi. Close and restart the SDK Setup program
5. Choose the packages that you wish install
a. If you are only interested in trying out the Android 2.0 Emulator
i. Reject everything except SDK Platform Android 2.0. API 5, revision 1 byselecting each item then selecting the Reject option
b. If you plan to develop Android applications and Games, you may wish to Accept
All
c. Click Install Selected
6. Allow the selected packages to download and install then close the Installing Archives
window
7. Create a new Android Virtual Device (AVD)
-
8/8/2019 Air for Android App
4/12
-
8/8/2019 Air for Android App
5/12
8. Start your newly created Virtual Device
a. Choose the Virtual Device from the list
b. Click Start
c. Click Launch
-
8/8/2019 Air for Android App
6/12
8. Allow copious time for Emulator to start up
Flash Builder Part:
9. Then, copy the AIR2.5 sdk folder and past into the folder path like this c://programfiles/
Adobe/FlashBuilder/sdks/4.x.x and then open the Flash Builder 4.
Hello WorldUsing Flash Builder
Flash Builder doesnt fully support the building and packaging of AIR for Android apps at thistime. You can program and compile an ActionScript application (Flex is not recommended), butpackaging the .apk file and installing it on a device must be done using command-line toolsoutside of Flash Builder.
http://c//programfiles/Adobe/FlashBuilder/sdks/4.x.xhttp://c//programfiles/Adobe/FlashBuilder/sdks/4.x.xhttp://c//programfiles/Adobe/FlashBuilder/sdks/4.x.xhttp://c//programfiles/Adobe/FlashBuilder/sdks/4.x.x -
8/8/2019 Air for Android App
7/12
Create a project
1. From the Flash Builder file menu, select New > Flex Project
The New Flex Project opens:
2. Enter a name for the project and choose the Desktop application type.
3. Use the Flex SDK containing the AIR 2.5 SDK for the project Flex SDK version. (ClickConfigure Flex SDK to add it to the list of available SDKs, if necessary.)
4. ClickNext twice.
-
8/8/2019 Air for Android App
8/12
5. Assign HelloWorld.as as the name of the main application file. Do not use .mxml as theextension.
-
8/8/2019 Air for Android App
9/12
6. ClickFinish to create the project.Write the codeFor this simple exercise, just create a TextField object, assign it some text, and add it to the stage.The finished HelloWorld.as file should look like the following:package{
import flash.display.Sprite;import flash.text.TextField;
public class HelloWorld extends Sprite{public function HelloWorld(){
var textField:TextField = new TextField();textField.text = "Hello, World!";stage.addChild( textField );
}}
}
Edit the application descriptor fileFlash Builder automatically creates an application descriptor file for you. The
element of the descriptor should indicate that you are using AIR 2.5:
(If a different namespace is listed, you may not be using the correct AIR SDK.)Although you can use the application descriptor file provided by Flash Builder as is, a fewchanges can make development easier. So, set visible to true, and supportedProfiles tomobileDevice. The finished application descriptor, with all the optional elements and commentsremoved, should look like the following:
test.example.HelloWorld
HelloWorldHelloWorld0.1.0
mobileDevice
true
true
-
8/8/2019 Air for Android App
10/12
]]>
Compile :
Flash Builder automatically builds the project and places the result in the bin-debug folder. You should
now have two files in this folder, HelloWord.swf and HelloWorld-app.xml.
7. After complied the application, to export the application with self-signed certificationwith password.
8. Open the command prompt and type the following commands,
* Change the current directory to the bin-debug folder in your HelloWorld Android project folder
cd C:\ AndroidProjects\HelloWorld - Android\bin-debug
* Run the ADT package command to convert the SWF into APK file
extension.
adt -package -target apk -storetype pkcs12 -keystore
../codesigningCert.p12 HelloWorld.apk HelloWorld-app.xml HelloWorld.swf
OR
* If add the debug mode in HelloWorld-app.xml, then the package command
is different like this,
adt -package -target apk-debug -storetype pkcs12 -keystore
../codesigningCert.p12 HelloWorld.apk HelloWorld-app.xml HelloWorld.swf
* We will get the HelloWorld.apkfile in the same directory.
-
8/8/2019 Air for Android App
11/12
Both are configured now, to run the emulator like this,
Open the android sdk and select the virtual device in left side of the panel
and select AVD2.2 and press start button to run the android emulator(refer
android Part).
Once we have the emulator running with the correct AVD we can now try and install the
AIR runtime!! in command window,
adb install Runtime_Emulator_Eclair_20100517.apk
From this you should see the following output in command prompt:
950 KB/s (6784204 bytes in 6.968s)
pkg:/data/local/tmp/Runtime_Emulator_Eclair_20100517.apk
Success
You can also check on your emulator that the adobe AIR runtime is installed by going to
Menu->Settings-Manage Applications and view the installed applications. You shouldsee something like this:
OK so that's the runtime installed now we just need to write a quick application and check
that it runs.
Then, install the android application into the android emulator,
In command Window type this,
adb install HelloWorld.apk
-
8/8/2019 Air for Android App
12/12
If you got a error Like this ,
950 KB/s (6784204 bytes in 6.968s)
pkg:/data/local/tmp/HellWorld.apk
Failed [INSTALL_FAILED_INVAILD_APK]
Note:
You must build the AIR application in proper format and restart the command window
and android application. It will work successfully.
If you got this result means, it install successfully,
950 KB/s (6784204 bytes in 6.968s)
pkg:/data/local/tmp/HellWorld.apk
Success
Android application to add the HelloWorld Application successfully look like this,