-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem building the master branch version #2
Comments
Marcelofrau: I have encountered the same problem (see #1) - the createInterface method is missing in the latest version of openfl/openfl-native (I guessed jgranick had it in his working copy but did not push to the repo). That's why I created jarnik/ouya_iap_openfl, using custom JNI handlers. |
I managed to have a solution for this. I am unable to post the solution I've found right now. I'll post here later on what I have done to solve the problem. Is a patch that I made on the JNI.hx, I think it's about 10 lines of code. I implemented the createInterface method so the openfl-ouya can reach the missing methods. |
Sorry for the delay. I included these lines after line 64 on the JNI.hx file: private static var alreadyCreated = new Map<String, Bool>();
private static var base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
public static function createInterface(haxeClass:Dynamic, className:String, classDef:String):Dynamic {
var bytes:Bytes = null;
if (!alreadyCreated.get(className)) {
bytes = Bytes.ofString(BaseCode.decode(classDef, base64));
bytes = Uncompress.run(bytes, 9);
alreadyCreated.set(className, true);
}
return nme_jni_create_interface(haxeClass, className, bytes == null ? null : bytes.getData());
}
private static var nme_jni_create_interface = Lib.load("nme", "nme_jni_create_interface", 3); |
Hello,
I just downloaded the master files and I am currently unable to build, I think this can be some misconfiguration on my enviroment perhaps?
When I try to execute the build with openfl build android or openfl test android, a error shows up and the build process terminate.
This is the message on the cmd output:
PS C:\Users\Keitaro\Desktop\ouya\projetos\ouya_iap_openfl-master> openfl build android
C:\HaxeToolkit\haxe\lib\openfl-ouya/1,0,2/tv/ouya/console/api/OuyaResponseListener.hx:8: characters 39-71 : openfl.utils.#JNI has no field createInterface
C:\HaxeToolkit\haxe\lib\openfl-ouya/1,0,2/tv/ouya/console/api/OuyaResponseListener.hx:8: characters 125-133 : Unknown identifier : classDef
src/Main.hx:50: characters 30-50 : Cannot access private field __jobject
PS C:\Users\Keitaro\Desktop\ouya\projetos\ouya_iap_openfl-master> .\uploadOUYA.bat
What can I do to build normally this project?
Thank you.
The text was updated successfully, but these errors were encountered: