Skip to main content
Participant
March 12, 2014
Question

ANE with Android packagedDependency

  • March 12, 2014
  • 2 replies
  • 4919 views

I've been working on an Ubertesters ANE for Android/iOS, starting with Android, and I've managed to get it to package the Ubertesters sdk as a depedency however when I build my game I get this as a result.

aapt tool failed:C:\Users\****\AppData\Local\Temp\4cefa32a-ef1e-4f66-ba1c-06c2b6a3289c\res\values\colors.xml: error: Duplicate file. C:\Users\****\AppData\Local\Temp\3c65dec5-4ebe-4b94-b90c-c3164cdefb12\captive_runtime_res\values\colors.xml: Original is here.

Suggestions/Thoughts?

This topic has been closed for replies.

2 replies

z_abdulgalimov
Inspiring
March 12, 2015

I had the same problem. Helped this:

In ANE introduced empty file res/values/strings.xm (necessarily in the catalog res/values/)

<?xml version="1.0" encoding="utf-8"?>

<resources>

</resources>

In platformoptions file for android:

<platform xmlns="http://ns.adobe.com/air/extension/16.0">

    <packagedDependencies>

        <packagedDependency>...</packagedDependency>

    </packagedDependencies>

   

    <packagedResources>

        <packagedResource>

            <packageName>ru.flashpress.uid.FPUniqueIdExt</packageName>

            <folderName>res</folderName>

        </packagedResource>

    </packagedResources>

</platform>

marchbold
Inspiring
May 28, 2014

What are you using to package ?

We've had some really odd results on Windows with Android ANE's that have a packaged resources and haven't been able to resolve it yet. While the same extensions package under OSX. Errors include things like:

aapt tool failed:C:\Users\{Name}\AppData\Local\Temp\599734f5-ec3d-438e-ac4c-b0d4ec98a0c3\app_entry_res\values\strings.xml:

19: error: Resource at app_version appears in overlay but not in the base package; use <add-resource> to add.

air native extensions // https://airnativeextensions.com
lostinthecloud
Participating Frequently
July 27, 2014

I'm having a similar (if not the same) problem. My problem occurs when I try to include a packagedDependency in the ANE I am building. I get many lines of error messages complaining about "overlays" and "base packages." Everything works fine as long as I don't try to package a dependency in the ANE.

I'm building the ANE on a PC running Windows 7 64-bit. I'm using ADT version 13.0.0.111.

platform.xml

<platform xmlns="http://ns.adobe.com/air/extension/4.0">

    <packagedDependencies>

        <packagedDependency>gson-2.2.4.jar</packagedDependency>

    </packagedDependencies>

</platform>

Command used to create ANE file:

adt -package -target ane packaged-extensions\Extension.ane extension.xml -swc Extension.swc -platform Android-ARM -platformoptions platform.xml gson-2.2.4.jar -C platform\Android . -platform default -C platform\default library.swf

Command used to create SWF file:

amxmlc -compiler.source-path=. .\<path>\explorer\ExplorerApp.mxml -compiler.include-libraries=packaged-extensions\Extension.ane -output .\ExplorerApp.swf

Command used to create APK file:

adt -package -target apk-captive-runtime -storetype pkcs12 -keystore certificate.pfx ExplorerApp.apk explorer-app.xml ExplorerApp.swf -extdir packaged-extensions

Example of error message:

C:\<user>\AppData\Local\Temp\23c05014-fb83-4f5f-8df1-a30a6b5a1670\app_entry_res\values-zh-rTW\strings.xml:19: error: Resource at app_version appears in overlay but not in the base package; use <add-resource> to add.

marchbold
Inspiring
July 27, 2014

I figured out what was causing our error so I thought I'd let you know, see if it helps you.

We had left the default strings.xml and other resources in the android library that we were writing our extension in. They just define some defaults (like app_version) and use it in the mail.xml layout.

As we don't actually use any of that in our extension we simply removed it, and the errors disappeared.

Any resources that we do use in our library (layouts/strings/images) we just make sure that they are uniquely names in our extension and don't overlap any of our other extensions or default file names (such as strings.xml).

Hope that helps

air native extensions // https://airnativeextensions.com