Skip to content

How to make a 64-bit ARM supported .ane ? #71

Closed

Description

@fan-c-yu

Problem Description

Describe your problem in detail. Include the following information:

  • Which AIR SDK did you use? Hint: always try the latest version from Adobe Labs.
    Adobe AIR SDK – for Mac 33.0.0.182 + Animate CC 2019 + macOS Mojave 10.14.5

  • Describe the affected environment: Flash vs. AIR, Android vs. iOS, all devices vs. just specific models.
    Android(for 64-bit ARM support)

  • Can you reproduce it yourself, or did you get reports from other users? If so, how many users are affected (percentage)?
    I reproduce it yourself

Steps to Reproduce

We are trying to update our ane to support 64-bit ARM.
We added 64-bit ARM platform into extension.xml.

<platform name="Android-ARM64">
    <applicationDeployment>
        <nativeLibrary>extension.jar</nativeLibrary>
        <initializer>com.exemple.android.adobeair.mylibraryExtension</initializer>
        <finalizer>com.exemple.android.adobeair.mylibraryExtension</finalizer>
    </applicationDeployment>
</platform>

And update the command by adding the 64-bit ARM platform which create the .ane file.

adt -package -target ane mylibrary.ane extension.xml \
    -swc mylibrary.swc \
    -platform Android-ARM64 -platformoptions platform-android.xml -C Android-ARM . \
    -platform iPhone-ARM -platformoptions platform-ios.xml -C iPhone-ARM .  \
    -platform default -C default .

The .ane file was successfully created. But the .apk of App which imported the .ane include arm-v8a directory only. And App cannot find .ane module when excute on a 64-bit ARM device.

VerifyError: Error #1014: Class com.exemple.adobeair::o:MyClass could not be found.
...

What should we do to make a 64-bit ARM supported .ane ?

Activity

  1. ajwfrost commented on Aug 6, 2019

    @ajwfrost
    Collaborator

    Hi

    The command line for ADT there is missing platform options for the 32-bit "Android-ARM" target .. so it might be worth checking that your ANE file (if you look at it in a zip file viewer) has got the correct contents within both "Android-ARM" and "Android-ARM64" subfolders? The extension.xml should also have both sections complete (and identical, for a Java-based ANE).

    There was a bug within the .182 build where the packaging was wrong if the ADT configuration file was used to change the architecture specified on the command line, which is a requirement when using Animate. So I suspect what's happened here is caused by this, or by a combination of this and the command used to package the ANE.

    My suggestion:

    • ensure the ANE command is right and the ANE file looks correct with the two folders for ARM/ARM64
    • try again with the latest beta release where the updated ADT packager should correctly take notice of the config file for adding the details from the ANE as well for the runtime binary.

    thanks

  2. fan-c-yu commented on Aug 15, 2019

    @fan-c-yu
    Author

    @ajwfrost

    Hi, Thank you for the suggestions.
    We use AIR SDK – for Mac 33.0.0.212 now.
    We updated the extension.xml.

    <platform name="Android-ARM">
        <applicationDeployment>
            <nativeLibrary>extension.jar</nativeLibrary>
            <initializer>com.exemple.android.adobeair.mylibraryExtension</initializer>
            <finalizer>com.exemple.android.adobeair.mylibraryExtension</finalizer>
        </applicationDeployment>
    </platform>
    <platform name="Android-ARM64">
        <applicationDeployment>
            <nativeLibrary>extension.jar</nativeLibrary>
            <initializer>com.exemple.android.adobeair.mylibraryExtension</initializer>
            <finalizer>com.exemple.android.adobeair.mylibraryExtension</finalizer>
        </applicationDeployment>
    </platform>
    

    And the command.

    adt -package -target ane mylibrary.ane extension.xml \
        -swc mylibrary.swc \
        -platform Android-ARM -platformoptions platform-android.xml -C Android-ARM . \
        -platform Android-ARM64 -platformoptions platform-android.xml -C Android-ARM . \
        -platform iPhone-ARM -platformoptions platform-ios.xml -C iPhone-ARM .  \
        -platform default -C default .
    

    The .ane file do have both folders for ARM and ARM64.
    The app worked well on a 64-bit device. But have error on a 32-bit device.

    [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
    

    We found the .apk file only have arm64-v8a folder.
    It looks like the 32-bit setting is missing in the .apk.
    What should we do to make a .apk support both 32-bit and 64-bit?

  3. marchbold commented on Aug 15, 2019

    @marchbold
    Collaborator

    You'll probably need to create a 32bit apk to run on a 32bit device. The APK won't contain both 32 and 64 bit versions.

  4. fan-c-yu commented on Aug 15, 2019

    @fan-c-yu
    Author

    @marchbold
    We Publish the app on Animate CC 2019 connected by a 32-bit device.
    Publish failed by INSTALL_FAILED_NO_MATCHING_ABIS error.

  5. ajwfrost commented on Aug 15, 2019

    @ajwfrost
    Collaborator

    Yes, so if you're targeting a 32-bit device, you need to make sure that you're generating an APK that's containing the 32-bit runtime (so remove/edit the adt.cfg file, if you're using Animate).

    When you're uploading to the Play Store, you need to have one APK for every target architecture. Most common is to have one for the 32-bit ARM platform, and one for the 64-bit ARM platform; they need to have the same application, but a different version code (the 64-bit one should be slightly higher perhaps, e.g. 1.0.0 for 32-bit and 1.0.1 for 64-bit?)

    Hope that helps.. it's a bit of a manual process at the moment, we're looking at trying to use the Android App Bundle mechanism but this will need quite a few changes..

  6. jeuxdaily commented on Aug 15, 2019

    @jeuxdaily

    hello
    please link AIR SDK 33

  7. fan-c-yu commented on Aug 19, 2019

    @fan-c-yu
    Author

    @ajwfrost
    Hi, Thank you for the suggestion.
    It worked on a 32-bit device by removeing the adt.cfg file of Animate CC.

    Most common is to have one for the 32-bit ARM platform, and one for the 64-bit ARM platform;

    So, we have to make two .apk files(one for 32-bit, another for 64-bit)?
    Is there any way to make one .apk for both target architecture like this?
    output_structure

  8. fan-c-yu commented on Aug 19, 2019

    @fan-c-yu
    Author

    @jeuxdaily
    Hello, we reveice the beta SDK from Harman.
    https://services.harman.com/contact-us

  9. jeuxdaily commented on Aug 19, 2019

    @jeuxdaily

    how are you doing this

    @ajwfrost
    Hi, Thank you for the suggestion.
    It worked on a 32-bit device by removeing the adt.cfg file of Animate CC.

    Most common is to have one for the 32-bit ARM platform, and one for the 64-bit ARM platform;

    So, we have to make two .apk files(one for 32-bit, another for 64-bit)?
    Is there any way to make one .apk for both target architecture like this?
    output_structure

    hello

    please more info

    thanks

  10. fan-c-yu commented on Aug 19, 2019

    @fan-c-yu
    Author

    @jeuxdaily

    We used Animat CC 2019 and AIR SDK – for Mac 33.0.0.212

    1. Add 64-bit ARM platform into extension.xml
    2. Make a .ane file by command which have both platforms
    3. Addadt.cfg like this to SDK’s lib folder when making a .apk for 64-bit.
    DefaultArch=armv8
    OverrideArch=armv8
    DebugOut=false
    
  11. jeuxdaily commented on Aug 19, 2019

    @jeuxdaily

    1-first answer:

    changed to

    2- need more info

    3- you mean :

    C:\Program Files\Adobe\Adobe Animate CC 2017\AIRSDK_Windows\lib

  12. fan-c-yu commented on Aug 19, 2019

    @fan-c-yu
    Author
    1. We use command to make a .ane. Add the -platform Android-ARM64.
    adt -package -target ane mylibrary.ane extension.xml \
        -swc mylibrary.swc \
        -platform Android-ARM64 -platformoptions platform-android.xml -C Android-ARM . \
        -platform iPhone-ARM -platformoptions platform-ios.xml -C iPhone-ARM .  \
        -platform default -C default .
    
    1. Yep, the SDK’s lib folder, alongside the adt.jar file.

    Do not know if works on windows.

  13. jeuxdaily commented on Aug 19, 2019

    @jeuxdaily

    what are the ANE you working with.

    I'm working with milkman but I thinks that plugin not supported 64bit

  14. fan-c-yu commented on Aug 19, 2019

    @fan-c-yu
    Author

    We do not use any Adobe Air plugin.

  15. jeuxdaily commented on Aug 19, 2019

    @jeuxdaily

    I'm trying to work in adobe animte cc 2017
    but no result

  16. jeuxdaily commented on Aug 19, 2019

    @jeuxdaily

    can you sent me this files

    extension.xml

    platform-android.xml

    platform-ios.xml

  17. fan-c-yu commented on Aug 19, 2019

    @fan-c-yu
    Author

    extension.xml

    <extension xmlns="http://ns.adobe.com/air/extension/24.0">
        <id>net.xxx.adobeair</id>
        <versionNumber>1.1.0</versionNumber>
        <platforms>
            <platform name="iPhone-ARM">
                <applicationDeployment>
                    <nativeLibrary>libxxxExtension.a</nativeLibrary>
                    <initializer>xxxExtensionInitializer</initializer>
                    <finalizer>xxxExtensionFinalizer</finalizer>
                </applicationDeployment>
            </platform>
            <platform name="Android-ARM">
                <applicationDeployment>
                    <nativeLibrary>extension.jar</nativeLibrary>
                    <initializer>net.xxx.android.adobeair.xxxExtension</initializer>
                    <finalizer>net.xxx.android.adobeair.xxxExtension</finalizer>
                </applicationDeployment>
            </platform>
            <platform name="Android-ARM64">
                <applicationDeployment>
                    <nativeLibrary>extension.jar</nativeLibrary>
                    <initializer>net.xxx.android.adobeair.xxxExtension</initializer>
                    <finalizer>net.xxx.android.adobeair.xxxExtension</finalizer>
                </applicationDeployment>
            </platform>
            <platform name="default">
                <applicationDeployment/>
            </platform>
        </platforms>
    </extension>
    

    platform-android.xml

    <platform xmlns="http://ns.adobe.com/air/extension/24.0">
        <packagedDependencies>
            <packagedDependency>xxx.jar</packagedDependency>
        </packagedDependencies>
        <packagedResources>
            <packagedResource>
                <packageName>net.xxx.android</packageName>
                <folderName>xxx-res</folderName>
            </packagedResource>
        </packagedResources>
    </platform>
    

    platform-ios.xml

    <platform xmlns="http://ns.adobe.com/air/extension/24.0">
      <sdkVersion>8.1</sdkVersion>
        <linkerOptions>
            <option>-ObjC</option>
            <option>-w</option>
            <option>-ios_version_min 8.1</option>
            <option>-rpath @executable_path/Frameworks</option>
            <option>-framework CoreLocation</option>
            ...
        </linkerOptions>
        <packagedDependencies>
            <packagedDependency>xxx.framework</packagedDependency>
        </packagedDependencies>
    </platform>
    
  18. ajwfrost commented on Aug 19, 2019

    @ajwfrost
    Collaborator

    FYI we don't currently support multiple architectures within a single APK file, ADT can only generate one architecture at a time. We're looking into updating this, ideally to see if we can use the Android App Bundle format..

  19. jeuxdaily commented on Aug 21, 2019

    @jeuxdaily

    thanks for sharing this files

  20. locked and limited conversation to collaborators on Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions