Frage

Working on the new android side of extensions with the changes. I have my separate extension as its own dependency.

In my code I require references to the Extension.Java class as well as the HaxeObject. These are located in extensions-api, which is it's own separate dependency.

I've tried including these files in my own dependency, this causes top-level exceptions because a number of the Java files were included twice. I've also tried not including the extensions-api, this works to some extent, however If in the future I decide to use more extensions this won't work (less than ideal).

I need to find a way to reference these files from one dependency to another. so from: MyExtension.src.org.haxe.nme.MyExtension and extension-api.src.org.haxe.nme.Extension

So I guess the point I'm stuck at is how I make these two dependencies see each other whilst compiling so that when they merge to make the .dex file they don't cause top-level exceptions.

I could potentially hack it by placing my extension into the extension-api folder. Something like:

<dependency name="extension-api" path="dependencies/MyExtension" if="android"/>

The issue with this being that the androidManifest merging wouldn't work.

War es hilfreich?

Lösung

I found the answer here:

the gist is in the project.properties file you want to add the line:

android.library.reference.1=../extensions-api

http://www.openfl.org/community/general-discussion/native-extensions/

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top