BowlerHatLLC / vscode-as3mxml

ActionScript & MXML language extension for Visual Studio Code. Develop apps for Adobe AIR, Adobe Flash Player, or Apache Royale.
https://as3mxml.com/
Apache License 2.0
257 stars 39 forks source link

Error reading Adobe AIR application <id> for platform "android". #666

Closed Shaunmax closed 1 year ago

Shaunmax commented 1 year ago

When trying to debug the project on an android device I am getting :

Error reading Adobe AIR application <id> for platform "android".

what could be the issue ? the same for iOS.

But I am able to debug in AIR Simulator.

joshtynjala commented 1 year ago

Does your asconfig.json file include the top-level application field? That's where it tries to find the ID.

Shaunmax commented 1 year ago

Does your asconfig.json file include the top-level application field? That's where it tries to find the ID.

is it this one "application": "src/FlappyStarling-app.xml", this is the file : https://github.com/Gamua/Flappy-Starling/blob/master/asconfig.json

joshtynjala commented 1 year ago

The application field can be found here:

https://github.com/Gamua/Flappy-Starling/blob/master/asconfig.json#L14

I can see that it's looking for src/FlappyStarling-app.xml.

This line, in particular is where the id should be found:

https://github.com/Gamua/Flappy-Starling/blob/master/src/FlappyStarling-app.xml#L4

I think it is failing because the id contains a - character. I need to fix that.

If you want a temporary workaround for this issue, change the id to something that doesn't contain -.

Shaunmax commented 1 year ago

No, I am still getting the same error.

 <id>com.gamua.flappystarling</id> <!-- Bundle Identifier. Required. -->
    <filename>flappystarling</filename> <!-- Used as the filename for the application. Required. -->
    <name>Flappy Starling</name> <!-- The name that is displayed below the app icon. -->
    <versionNumber>0.0.1</versionNumber> <!-- Required. -->
Shaunmax commented 1 year ago

No, I am still getting the same error.

 <id>com.gamua.flappystarling</id> <!-- Bundle Identifier. Required. -->
    <filename>flappystarling</filename> <!-- Used as the filename for the application. Required. -->
    <name>Flappy Starling</name> <!-- The name that is displayed below the app icon. -->
    <versionNumber>0.0.1</versionNumber> <!-- Required. -->

Ok! after restarting the code editor its not showing the error.

Shaunmax commented 1 year ago

now, I getting the error : image

'--air', 'android'" terminated with exit code: 12.

joshtynjala commented 1 year ago

According to ADT error messages, error code 12 means:

Invalid input | Verify file paths and other arguments passed to ADT on the command line.

Most likely, some kind of path that you specified in asconfig.json is wrong.

If you want to see the full command generated from asconfig.json for ADT, set as3mxml.asconfigc.verboseOutput to true in VSCode's settings. It might give you some clues.

Shaunmax commented 1 year ago

I just added a new keystore file in the src folder.

"mainClass": "FlappyStarlingMobile",
    "application": "src/FlappyStarling-app.xml",
    "airOptions": {
        "android": {
            "output": "out/flappy.apk",
            "listen": true,
            "signingOptions": {
                "storetype": "pkcs12",
                "keystore": "src/flappy_starling.p12"
            },
            "resdir": "system/res"
        }

additional information, I only see this : WARNING: could not find appropriate Java Home location for v11+ JDK WARNING: could not find appropriate Java Home location for v8+ JDK

c:\Users\mypc\Documents\GitHub\Flappy-Starling\out\FlappyStarling-app.xml: error 305: Intial window content SWF version 50 exceeds namespace version http://ns.adobe.com/air/application/33.1

joshtynjala commented 1 year ago

c:\Users\mypc\Documents\GitHub\Flappy-Starling\out\FlappyStarling-app.xml: error 305: Intial window content SWF version 50 exceeds namespace version http://ns.adobe.com/air/application/33.1

Looks like this is your issue. Change the namespace in FlappyStarling-app.xml to match your AIR SDK version.

Shaunmax commented 1 year ago

c:\Users\mypc\Documents\GitHub\Flappy-Starling\out\FlappyStarling-app.xml: error 305: Intial window content SWF version 50 exceeds namespace version http://ns.adobe.com/air/application/33.1

Looks like this is your issue. Change the namespace in FlappyStarling-app.xml to match your AIR SDK version.

Yes, I changed it to 50.1 but

WARNING: could not find appropriate Java Home location for v11+ JDK
WARNING: could not find appropriate Java Home location for v8+ JDK
NOTE: The application has been packaged with a captive runtime.

image

joshtynjala commented 1 year ago

Okay, since you see the captive runtime message, it means that compiling and packaging are completing successfully. Now you're having trouble with installation/launch on the device.

According to the docs page I linked above, ADT exit code 15 means:

No devices | Verify that a device is attached and turned on or that an emulator is running.

There are several things to try:

  1. Did you remember to connect the device to your computer with a USB cable?
  2. Did you enable developer mode in the Android settings?
  3. Is the device asking for any kind of permission to connect to your computer? (You may need to unlock the device to see this)
  4. Disconnect and reconnect the USB cable.
Shaunmax commented 1 year ago

4. Disconnect and reconnect the USB cable

this worked