Creating an apk

Hi, I'm new with Adobe Air and I got a problem with creating an apk. I use the xml and html files from the sdk tutorial (HelloWorld), yet I get an error when creating the apk:
HelloWorld-app.xml: error 304: Initial window content is invalid
What am I doing wrong?
I used the following command:
adt -package -target apk -storetype pkcs12 -keystore newselfcert.p12 HelloWorld.apk HelloWorld-app.xml HelloWorld.html
Her my xml file:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://ns.adobe.com/air/application/2.5">
    <id>examples.html.HelloWorld</id>
    <versionNumber>0.1</versionNumber>
    <filename>HelloWorld</filename>
    <initialWindow>
        <content>HelloWorld.html</content>
        <visible>true</visible>
        <width>400</width>
        <height>200</height>
    </initialWindow>
</application>
Here my html file:
<!DOCTYPE HTML>
<html>
<head>
    <title>Hello World</title>
    <script type="text/javascript" src="AIRAliases.js"></script>
    <script type="text/javascript">
        function appLoad(){
            air.trace("Hello World");
    </script>
</head>
<body onLoad="appLoad()">
    <h1>Hello World</h1>
</body>
</html>

Holy crap ! got exactly the same issue
Is there any workaround ? a generic swf file loading an html file my app is full html ... is there the same limitation for iPhone app ?
The documentation said "The file referenced in the <content> element of the application descriptor is not recognized as a valid HTML or SWF file."

Similar Messages

  • Trying to create a certificate file using keytool -help!

    Hi, I've followed a series of instructions using Terminal to create a certificate. Terminal produced a file and when i open it using Text Edit its about 20 lines long worth of code. I was hoping it would provide a certificate I could use. Maybe it has, I just don't know what I'm looking for!
    Im working in Viewer Builder and I'm in the Provisioning tab trying to enter the "Application ID"
    I'm totally stuck here. Please help!

    I'm using DPS pro. My app is for Android but won't be going as far as Google Play or Amazon. It's for internal use so I want to create an APK file to distribute via email. These are the set of instructions I'm following. I'm struggling to get this to work. What should I see when this has worked? Also what do I need to enter for the Application ID?
    Thanks or your help
    (Mac OS) Create a certificate file using Keytool
    Open Terminal, which is located in the Applications > Utilities folder.
    Type (or paste) the following line (replace “myname.key.p12” with the actual name of your certificate):
    1
    keytool -genkey -v -keystore myname.key.p12 -alias alias_name -keyalg RSA -keysize 2048 -storetype pkcs12 -validity 10000
    Specifying “10000” sets the expiration date after 22 October 2033.
    Enter and reenter a password. Until the Viewer Builder supports the creation of custom Android apps, it's necessary to share this password with Adobe. Create a password that you can share.
    Follow the prompts to specify the certificate information.
    When prompted to confirm choices, enter yes, and then press Return to use the same password.
    A certificate is created in your prompt location, such as your user name folder. Copy this certificate file to a known location. Write down the password as well.

  • Changing Package Name of an AIR apk

    Hi. I have created an AIR app that is currently in the market. To update the app, obviously I must keep the same package name. My first version's were packaged using Eclipse with the ADT plugin.
    Now to use AIR 3.0 Native Extensions (ANE) which were not available when I first developed the app, I currently must create my APK using AIR's command line tools. Unfortunately, these command line tools force you to have a package name that starts with the word "air". For example, I need the package name "com.example". AIR creates the package name as "air.com.example".
    So now, I cannot update my app in the market since the package name has changed. Adobe has this horrific article to help you rename and remove the "air" in the package. I'm not a great programmer so this has really stumped me.
    http://kb2.adobe.com/cps/875/cpsid_87562.html
    Apparently this info is out of date or incorrect in a few areas.
    I have completely stumbled at step 12 which uses apkbuilder:
    apkbuilder final.apk -u -z resources.arsc -f classes.dex
    I am getting this error message:
    THIS TOOL IS DEPRECATED. See --help for more information.
    java.io.FileNotFoundException: resources.arsc does not exist
    I have used step 10 to create the new resources.arsc file. It clearly DOES exist and in the correct location. I tried using apkbuilder with other resources.arsc files taken from other projects. I still get the same error message.
    Maybe there is another way to do this using another tool like like apkTool. http://code.google.com/p/android-apktool/
    I tried this but then couldn't get jarsigner to sign the apk properly.
    Is there a chance in hell of this working? There doesn't seem to be much about this topic on the internet. If anyone is interested in this, I have a zip file with a sample AIR apk, windows bat files for all the command line work, and all the needed utilities so they don't need to be downloaded. To get started you just need to change my path.bat to fit your system. And you need notepad++ (or an equivalent) to batch automate renaming the package name across several files.
    http://bradwallacedesign.com/dktimer/renameApkProject.zip
    Thanks so much!

    If the DisplayObject is on the timeline then its name cannot
    be modified, but the name property of dynamically created
    DisplayObjects can be changed. (DisplayObject.name:String
    read/write).

  • Creating your first AIR application for Android with the Flex SDK

    This question was posted in response to the following article: http://help.adobe.com/en_US/air/build/WS901d38e593cd1bac25d3d8c712b2d86751e-8000.html

    The name of the self-signed cert that is generated in the "Create the APK package file" step is sampleCert.pfx, but the name of the file in the next step is sampleCert.p12. This should be fixed.

  • Creating app for multiple screen sizes?

    Hello.  I've recently created an .apk file from Flash Professional using AS3 (probably obvious in this forum, but I wanted to be clear).  I've been testing it on an ASUS Android tablet.  However, I realized that even if I get the app to look fine on this tablet, there are other tablets out there with many different sizes that could have the app look weird.
    I've been searching Google for tips on this, but a lot of it doesn't make sense.  Is there a pretty easy way to get your app to 'read' the tablet's dimensions and scale itself to those dimensions?  I know I could make a different file for each screen size, but wouldn't that require putting several different app files in the app store?  That seems silly.  Any tips?

    first, you should check the scaleMode property of the stage which will allow you to specify how your stage is sized to fit the display.
    then, you can use the stage's stageWidth and stageHeight properties to size and position your display elements, if that's needed (because with showall you probably won't need to do any sizing/positioning).

  • To create a simulation tutorial of an iPad App using Adobe Captivate 08.

    To create a simulation tutorial of an iPad App using Adobe Captivate 08.
    The solution I got is to use Reflector App to mirror the iPad on to the PC and then record the screen. And to show user taps (essential for creating a simulation) through the reflector, NRTouchPoints, a UIWindow subclass that simulates user touches on the screen, has to be included in the application. Has anyone tried this out? Is this suggestion feasible?

    After developing the .swf, I'm creating a .apk (Android application
    package) file which includes the finished .swf file (at 720x1280), 3 icon
    files  (one of which is used as the button on the Android screen to start
    the app), the required .xml file (which holds the necessary info on how
    Android uses the .apk file).
    The finished .apk file is then uploaded to the Android device using the adb
    (Android Debug Bridge) commands in a command prompt.
    Gary Giurbino*
    eLearning Developer
    *Enterprise *Product Docs & Communication
    W: 650.214.2462
    [email protected]
    <http://www.google.com/>*
    1600 Amphitheatre Pkwy
    Mountain View, CA 94043

  • Converting AIR file to APK file

    Hi to all...
    I am new to adobe air ..I am developing a desktop application using adobe flex builder 3....I exoprt my project as .air file and execute it in adobe air 2.7 and its work fine in my system ....
    Now my questions are..
    1. whether may i convert that desktop application into .apk file to run in android phone?
                  if the answer is yes how can we do that...
    2. what are the changes i have to made in code for doing so?
    3 .In some forums i read that we can do it by using ADT..what are the steps we have to follow for doing that..
    Help me out in this issue...thanks in advance...

    You can create an APK package directly from an existing AIR or AIRI file:
    adt -target apk -storetype pkcs12 -keystore ../codesign.p12 myApp.apk myApp.air
    (PS:-The AIR file must use the AIR 2.5 (or later) namespace in the application descriptor file.)
    You seem to using the wrong the keystore argument.
    -Varun

  • Parse/Read APK file Adobe Air Android

    Hi Guys!
    I have problem uploading my apk file on google play, since it's bigger than 50MB and I want to upload a simple loader file and then download the expansion APK and open its swf file.
    Any ideas on how to parse the APK and reach the swf file?
    Cheers!

    Hi,
    Did you create your apk file using Flash Builder Burrito? If yes, Flash Builder Burrito does not support emulators. Packages created with Burrito are only intended to run on pyshical devices.
    Thanks,
    -Sedat Akkus

  • Unable to serve .APK file over HTTPS

    I have created an .APK mime type and put up a test APK on the default IIS site. Everything downloads fine on an Android handset.
    Mime-type : application/vnd.android.package-archive
    I've then created a NEW site to host this file and added the same mime-type etc. When I download the file on an Andoird handset it sees the site, link and file, and when selected it begins a download but immediately fails.
    The filename is and the error message is "Download Unsuccessful".
    Even changing to a default mime-type - application/octet-Stream same problem occurs.
    I'm sure its a configuration or permissions issue for IIS but I cant figure out what. I've replicated the NTFS permissions from the default wwwroot folder to this new site.
    The only difference is the new site is HTTPS while the default site is HTTP. If I allow HTTP on the new site it works fine.
    EDIT: Forgot to add that a desktop browser (Chrome and IE) both download the file fine from the default and new site.

    Hi,
    I notice the issue is more related to IIS. Since IIS has its specific forum to provide professional support, I suggest you report the question there. Thanks for your understanding.
    http://forums.iis.net/
    Niki Han
    TechNet Community Support

  • Installed apk's version cant show (air for android flash builder 4.6)

    I create android apk using flash builder 4.6.
    apk create successfully but after installed the apk , I cant see apk's version no on device.
    version no is wrote in my-app.xml like this
         <versionNumber>0.0.157</versionNumber>
         <versionLabel>1.57</versionLabel>
    I also create android apk using same my-app.xml by flash builder 4.5
    then I can see the apk's version no on device
    does anyone know how the apk's version visible using flash builder 4.6??

    Me Also !!!  This is extremly frustrating.  We follow the Updatinging the ADT Plugin instructions for Android and Flash Builder 4.6 is supposed to be Eclipse based.
    Well it shows up and installs -- BUT It Never shows up in the Flash Builder 4.6 Preferences.
    Installing the ADT Plugin
    Which is at
        http://developer.android.com/sdk/eclipse-adt.html#installing
    Did Adobe fire all their good developers?
    Hey ADOBE - We've spent a lot of money on your products and we're trying to get Jobs and any other work we can done.
    I'm planning on moving to the SF/Bay Area and there isn't crap here in Michigan.
    Resume at, http://www.activecommunity.com/RDT-Resume.zip
    Just a holding page site for an Independent Software Developer looking for W2 or 1099-MISC as I just ended work with a Healthcare company and a Real-Estate company >> but coming soon is the MARCH of the TABLETS.

  • Versioning of multiple APKs for Android

    Recently, with AIR 14, we announced x86 support for AIR applications. In this post, we explain how should developers manage the binary upload on Google Play Store for ARM and x86 binaries. Android devices are available with three kind of architectures - ARM, x86 and devices which support both x86 and ARM architectures (Eg: Samsung Galaxy Tab 3 10.1). AIR SDK (14.0.0.125 beta onwards) allows developers to create separate APK files for ARM and x86 architectures. And Google Play Developer console provides CPU architecture (ABI) as a filter criteria to support multiple APKs for the same application. The way Adobe AIR developers should make use of this filter criteria would depend on the packaging mode - captive or shared.
    For Apps packaged with Captive mode
    Please take a look at the following documentation. AIR developers should follow the same guidelines, as are mentioned for native applications.
    http://developer.android.com/google/play/publishing/multiple-apks.html
    Assigning a higher versionNumber  (in application descriptor) for the x86 version of apk would ensure that the Google Play serves x86 binary to devices with both x86 and ARM support,  thereby resulting in better performance.
    For Apps packaged with Shared mode
    After the recent release of x86 support in AIR, Play Store will have two different binaries for AIR Runtime app– one for ARM devices, and another for x86 devices. For devices which can run both, ARM binary version would be preferred because that used to get downloaded even before we introduced x86 support. And we plan to continue with the same preference to ensure that shared apps dependent on AIR runtime aren’t affected. To align with AIR Runtime app, applications packaged in shared mode should also keep their x86 based binary with lower versionNumber. With this approach, if you face any performance related issues on devices which support both the processors, then you can opt for captive mode of packaging.
    The table below summarizes what version gets downloaded on device with different processors type.
    ARM Device
    x86 Device
    Device supporting both x86 and ARM
    Runtime.apk
    ARM version
    x86 version
    ARM version
    Captive App
    ARM version
    x86 version
    x86 version
    Shared App
    ARM version
    x86 version
    ARM version
    -Thanks
    Adobe AIR Team

    It won't replace it if
    1) You are in Advanced Mode.....
    2) Your Version Numbers are different....
    I think replied to your other thread. If you are using captive runtime included in your app, the app version of the 86x needs to be higher.... if not the ARM version needs to be higher....

  • Need to 'launch' AIR app from SD card on Samsung Galaxy TABLET...

    April/28/11 at 3pm ET
    Hi to the group...
    Not 100% sure if this is proper forum to ask this, if anyone knows a better one please point me to it via ([email protected])
    Ok. Trying to see if my working .AIR app will run on my pals Samsung Tablet (before I buy one for myself)...
    Dropped the 'AIR' file onto the SD card (I can see it (the AIR file, size correct) via the fileBrowser app but clicking it does nothing.
    Of note AIR is installed in background of the device and it is running.
    Cant see/find an 'Adobe AIR launcher?' icon' anywhere (only see Adobe PDF browser).
    In all my web searching I see 10000 developer related tutorials re: creating an APK file / converting to APK file using Flash Professional ect.  Not what I am looking for...
    I think I am missing something very basic here is there a launcher for AIR apps on Android?
    TIA //GregH

    Hello
    Thank you for your post.
    You cannot throw directly from your external device, however you can once that file is transferred to internal memory.
    please review this guide for instructions on how.
    How to throw (send) music, video or picture files to a DNLA compatible device.
    https://us.en.kb.sony.com/app/answers/detail/a_id/34563/c/65,66/kw/34563

  • IOS app starts with black screen when compiled via ADT (Flex 4.6, AIR3.7)

    I was using Flex 4.6 with AIR 3.1 in Flash Builder 4.6 on Windows 7. I used two build methods: 1) "Export Release Build" in Flash Builder during development and 2) the ADT toolchain on my build server.
    For the ADT method I would create AIR intermediate files using:
    "C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\FlashBuilderC.exe" --launcher.suppressErrors -noSplash -application org.eclipse.ant.core.antRunner -data [PATH_TO_SOURCE] -file [PATH_TO_BUILD_XML] [PROJECT_NAME]
    Where my build.xml looks like:
    <?xml version="1.0"?>
    <project default="main">
        <target name="main">
            <fb.exportReleaseBuild project="[PROJECT_NAME]" basefilename="[BASE_FILE_NAME]" verbose="true" destdir="bin-release" />
        </target>
    </project>
    From these intermediate AIR files I would create my APK and IPA files using ADT like so (shown for iOS):
    echo [CERTIFICATE_PASSWORD]|"C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0\bin\adt" -package -target ipa-test -provisioning-profile [PATH_TO_MOBILE_PROVISIONING_FILE] -storetype PKCS12 -keystore [PATH_TO_DEV_CERTIFICATE] [OUTPUT_PATH] [PATH_TO_IOS_AIRI]
    This procedure produced working iOS and Android apps as well.
    I decided to upgrade AIR to version 3.7. I used the overlay proceedure described here (http://helpx.adobe.com/x-productkb/multi/how-overlay-air-sdk-flex-sdk.html). I also updated the namespace in my project to reflect the new AIR version. Using "Export Release Build" in Flash Builder produces working copies of both the iOS and Android apps. Furthermore, the secondary method (used on my build server), produces both APK and IPA files without error. The APK works just fine but the IPA does not. When running the app on an Apple device, it starts up with a black screen and stays this way.
    To summarize:
    Flex 4.6, AIR 3.1: "Export Release Build" and ADT tool chain produce working APK and IPA files.
    Flex 4.6, AIR 3.7 using overlay procedure: "Export Release Build" produces working APK and IPA files, ADT tool chain produces working APK file but IPA file loads black screen on Apple devices.
    More notes:
    I had made a back up of the "4.6.0" directory that holds the Flex and AIR SDK files. If I replace the overlayed Flex 4.6.0 SDK directory with the original (which contains AIR 3.1) and revert the namespace back to 3.1 in my project, everything goes back to normal and I get working apps via both methods described above.
    Edit: I also should note that I've tried many other combinations of Flex and AIR (Flex 4.9.1 from Apache and AIR 3.5/3.6), which all produce the same issue. It seems that the overlay procedure breaks something for ADT with iOS specifically...
    Edit 2: I also noticed that the IPA files output by methods 1 and 2 are slightly different. Opening these with 7-Zip I see that most of the files are the same, but some differ slightly in size (this was due to 'ipa-test' vs 'ipa-ad-hoc'). The odd thing is that in the IPA file that does not work (produced via the ADT method), the SWF file is named "swf3465180827438224920.tmp" while the SWF in the IPA that was created using "Export Release Build is named "[PROJECT_NAME].swf". It almost appears as though ADT fails to rename the temporary SWF file. I also realized that the "Export Release Build" method likely used '-target ipa-ad-hoc', so I tried this in the ADT method with the same result.
    Any thoughts?

    Hello Nimit,
    Thank you for your response. I have tried AIR 3.8 Beta and this did not correct the problem. I downloaded the AIR 3.7 SDK from http://airdownload.adobe.com/air/win/download/latest/AdobeAIRSDK.zip . I have also tried with the new compiler as well, with the same result.
    To keep things simple, I've created a very lightweight example with which I see the issue. I've also been able to remove the Flash Builder step and reproduce the problem with mxmlc and adt only. Since the files are simple, I will just post them here.
    TestApp-app.xml
    <?xml version="1.0" encoding="utf-8" standalone="no"?>
    <application xmlns="http://ns.adobe.com/air/application/3.7">
        <id>com.company.testapp</id>
        <filename>TestApp</filename>
        <versionNumber>1.0.0</versionNumber>
        <initialWindow>
            <content>TestApp.swf</content>
            <autoOrients>false</autoOrients>
            <fullScreen>true</fullScreen>
            <visible>true</visible>
            <softKeyboardBehavior>none</softKeyboardBehavior>
        </initialWindow>
        <android>
            <colorDepth>16bit</colorDepth>
            <manifestAdditions><![CDATA[
                <manifest android:installLocation="auto">
                    <uses-permission android:name="android.permission.INTERNET"/>
                </manifest>
            ]]></manifestAdditions>
        </android>
        <iPhone>
            <InfoAdditions><![CDATA[
                <key>UIDeviceFamily</key>
                <array>
                    <string>1</string>
                    <string>2</string>
                </array>
            ]]></InfoAdditions>
            <requestedDisplayResolution>high</requestedDisplayResolution>
        </iPhone>
    </application>
    TestApp.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" firstView="TestView" applicationDPI="160">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
    </s:ViewNavigatorApplication>
    TestView.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" title="Test App" >
        <s:VGroup width="100%" height="100%" verticalAlign="middle" horizontalAlign="center" >
            <s:Label text="Hello World!" />
        </s:VGroup>
    </s:View>
    Create the above files in a single directory. Run the following to get a working IPA (method 1):
    > mxmlc +configname=airmobile TestApp.mxml
    > adt -package -target ipa-test -provisioning-profile [PROVISIONING_FILE] -storetype pkcs12 -keystore [CERTIFICATE] TestApp.ipa TestApp-app.xml TestApp.swf
    To reproduce the problem, run the following (method 2):
    > mxmlc +configname=airmobile TestApp.mxml
    > adt -prepare TestApp.airi TestApp-app.xml TestApp.swf
    > adt -package -target ipa-test -provisioning-profile [PROVISIONING_FILE] -storetype pkcs12 -keystore [CERTIFICATE] TestApp.ipa TestApp.airi
    If you unpack the working IPA (from method 1) you will see the file "TestApp.ipa\Payload\TestApp.app\TestApp.swf". However, if you likewise inspect the IPA created via the AIR intermediate method (method 2), you will see the file "TestApp.ipa\Payload\TestApp.app\swf1970057761096800694.tmp" and there will be no "TestApp.swf". In both IPA files, if we inspect "TestApp.ipa\Payload\TestApp.app\Info.plist", we see the snippet:
            <key>CTInitialWindowTitle</key>
            <string>TestApp</string>
            <key>CTInitialWindowContent</key>
            <string>TestApp.swf</string>
            <key>CTMaxSWFMajorVersion</key>
            <string>20</string>
            <key>CFBundleSupportedPlatforms</key>
    So I suspect "TestApp.ipa\Payload\TestApp.app\swf1970057761096800694.tmp" is incorrectly named, cannot be found at runtime and thus displays a black screen.
    This problem is observed when using AIR 3.7. It is not observed when using AIR 3.1.

  • Adobe Air for win8 metro apps

    Hi guys,
    I might be a little early with the question, but actually its something which will bug us all at some point.
    Windows 8 METRO apps.
    On tablets the metro interface will not support the flash plugin on websites, so we cannot have flash apps on it unless we can really make metro apps (which I heard will only be available through the MS webstore? )
    Is this then the same like when we now create an APK for android or a IPA for Iphone using flash cs5.5 ?
    Is there any more information available on this apart from the message from Adobe that the THINK it will run ?
    Kind regards,
    Bart

    I haven't heard any more than you Bart, but I'll +1 this for some answers!

  • Adobe air 3.2.0 android - custom uri issue

    Custom URIs are no longer registered/handled by the adobe air wrapper on android devices.
    Tested on evo4g with android 2.3.5  and galaxy tab with android 3.2.
    How to reproduce:
    create your apk with adt having these settings in your application.xml / android / manifestAdditions / manifest / application:
    <activity android:name="helpNav">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:mimeType="application/pdf" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="http" android:host="www.this-so-does-not-exist.com" android:path="/something" />
      </intent-filter>
    </activity>
    How to test:
    Open the browser and navigate to http://commonsware.com/sample and click any of the given links. Your air application will not be presented as an intent provider.
    More traces captured with DDMS:
    04-02 19:47:06.602: I/ActivityManager(128): Starting activity: Intent { act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=http://www.this-so-does-not-exist.com/something cmp=android/com.android.internal.app.ResolverActivity } from pid 10018
    Simple schemes like <data android:scheme="myscheme" /> dont work anymore either.
    Any advice greately appreciated.
    Kind regards.

    I have narrowed down the bug to this node:
    <application android:hardwareAccelerated="true"/>
    Once this setting is added to application.xml / application / android / manifestAdditions / manifest none of the intent filters are working.
    Full application.xml pasted at http://pastebin.com/xyCKsn36 (see line 30).
    Sample APK uploaded at: http://helpnav.com/bin/HelloWorld.apk
    How to replicate:
    - install the provided apk, open Browser and type in helloworld:
    Expected result: Application should be launched
    Actual result: intent provider not found so the search intent kicks in.

Maybe you are looking for