Compile error with OpenFL

11 posts (showing 1-11)
Vasco_F

Market Level 6Community Level 1
59 posts

I'm using OpenFL (3.6.1) with HaxeFlixel. Lime version is 2.9.1. I added the Enhance-Extension, and when I tried to compile, the following error appeared:

- src/EnhanceInAppPurchases.cpp Error: ./src/EnhanceInAppPurchases.cpp: In member function 'Void EnhanceInAppPurchases_obj::__construct()': ./src/EnhanceInAppPurchases.cpp:21:18: error: '::lime' has not been declared Dynamic tmp = ::lime::_system::JNI_obj::createStaticMethod(HX_HCSTRING("org.haxe.extension.Enhance","\x21","\x87","\xd9","\x7f"),HX_HCSTRING("isPurchasingSupported","\x46","\xb5","\xbf","\xbd"),HX_HCSTRING("()Z","\x39","\x7e","\x1e","\x00"),null(),null()); HX_STACK_VAR(tmp,"tmp"); ^

./src/EnhanceInAppPurchases.cpp:25:19: error: '::lime' has not been declared Dynamic tmp1 = ::lime::_system::JNI_obj::createStaticMethod(HX_HCSTRING("org.haxe.extension.Enhance","\x21","\x87","\xd9","\x7f"),HX_HCSTRING("attemptPurchase","\xee","\xcd","\xc1","\x85"),HX_HCSTRING("(Ljava/lang/String;)V","\x7f","\xb4","\xbc","\xc7"),null(),null()); HX_STACK_VAR(tmp1,"tmp1"); ^

./src/EnhanceInAppPurchases.cpp:29:19: error: '::lime' has not been declared Dynamic tmp2 = ::lime::_system::JNI_obj::createStaticMethod(HX_HCSTRING("org.haxe.extension.Enhance","\x21","\x87","\xd9","\x7f"),HX_HCSTRING("getDisplayPrice","\x9d","\x7a","\xce","\xf7"),HX_HCSTRING("(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;","\x77","\xff","\xf6","\x70"),null(),null()); HX_STACK_VAR(tmp2,"tmp2"); ^

./src/EnhanceInAppPurchases.cpp:33:19: error: '::lime' has not been declared Dynamic tmp3 = ::lime::_system::JNI_obj::createStaticMethod(HX_HCSTRING("org.haxe.extension.Enhance","\x21","\x87","\xd9","\x7f"),HX_HCSTRING("isItemOwned","\xc8","\xb4","\xe2","\x16"),HX_HCSTRING("(Ljava/lang/String;)Z","\x83","\xb4","\xbc","\xc7"),null(),null()); HX_STACK_VAR(tmp3,"tmp3"); ^

./src/EnhanceInAppPurchases.cpp:37:19: error: '::lime' has not been declared Dynamic tmp4 = ::lime::_system::JNI_obj::createStaticMethod(HX_HCSTRING("org.haxe.extension.Enhance","\x21","\x87","\xd9","\x7f"),HX_HCSTRING("getOwnedItemCount","\x0d","\xf5","\x4e","\x69"),HX_HCSTRING("(Ljava/lang/String;)I","\x72","\xb4","\xbc","\xc7"),null(),null()); HX_STACK_VAR(tmp4,"tmp4"); ^

./src/EnhanceInAppPurchases.cpp:41:19: error: '::lime' has not been declared Dynamic tmp5 = ::lime::_system::JNI_obj::createStaticMethod(HX_HCSTRING("org.haxe.extension.Enhance","\x21","\x87","\xd9","\x7f"),HX_HCSTRING("consume","\xbc","\x79","\xda","\x18"),HX_HCSTRING("(Ljava/lang/String;)V","\x7f","\xb4","\xbc","\xc7"),null(),null()); HX_STACK_VAR(tmp5,"tmp5"); ^

Build halted with errors.

I'll ask in the OpenFL forums too. I'd really like to try this, but I want to release the game in 2 or 3 days, so if I can't find a solution quick I'll have to use something else :/

posted 2017-12-10T03:21:08-08:00 | edited 2017-12-10T03:26:27-08:00
FGL_Kacper

FGL AdminCommunity Level 0
21 posts

Hello Vasco_F!

Your issue may be caused by using the outdated version of OpenFL/Lime. You should use the latest versions if possible, otherwise we cannot guarantee that the library will work as expected. Here's the configuration I'd suggest to use:

OpenFL: 6.5.3

Lime: 5.9.1

HXCPP: 3.4.64 (avoid v3.4.188, it's probably broken). You can set this with the following command: haxelib set hxcpp 3.4.64

Android NDK: 14b (again, please avoid the latest version, it's not compatible with HXCPP 3.4.64).

I've just tested this config and it seems to work fine with our connector. Unfortunately OpenFL is really fussy when it comes to putting all the pieces together, so if you run into any new issue please let me know and I'll be happy to help you!

posted 2017-12-11T01:59:07-08:00 | edited 2017-12-11T02:00:20-08:00
Vasco_F

Market Level 6Community Level 1
59 posts

Thanks! Indeed, the problem seems to be due to an outdated version of Lime. Unfortunately, I can't upgrade it because these are the more recent versions of Lime and OpenFL that HaxeFlixel currently supports.

Also, I tried integrating Enhance with only "ZeroCode" options, but when I run the APK a message saying "Loading..." appears, and then the app crashes. I've had similar problems with trying Enhance in HaxeFlixel/OpenFL games before.

posted 2017-12-11T08:05:43-08:00
FGL_Kacper

FGL AdminCommunity Level 0
21 posts

Hello Vasco_F,

I'll look into your ZeroCode issue and come back here with more informations as soon as possible.

Regarding the connector issue, could you show me the output of haxelib list command, please? It would be helpful.

Thanks,

Kacper

 

posted 2017-12-12T08:56:50-08:00 | edited 2017-12-12T08:57:38-08:00
Vasco_F

Market Level 6Community Level 1
59 posts

Sure:

extension-android-support-v4: [1.0.0]

extension-googleplayservices-basement: [1.1.0]

extension-googleplayservices-lib: [1.1.1]

extension-iap: [1.2.2]

extension-supersonic: git [dev:C:\HaxeToolkit\haxe\lib\extension-supersonic/git]

firetongue: [2.0.0]

flixel-addons: 1.0.3 1.1.1 [2.4.1]

flixel-templates: 1.0.2 [2.4.2]

flixel-tools: 1.0.2 1.1.2 [1.3.0]

flixel-ui: 1.0.2 [2.2.0]

flixel: 3.3.12 3.3.5 [4.2.1]

ganalytics: [0.0.3]

google-play-services: [1.1.0]

haxelib_client: 3.1.0-rc.4 [3.2.0-rc.3]

hxcpp: 3.1.39 3.2.205 [3.4.64]

hxlibc: [1.1.4]

hxtools: [1.1.6]

lime-samples: [4.0.1]

lime-tools: [1.5.7]

lime: 1.0.1 2.8.3 [2.9.1] 4.0.2 4.1.0 5.0.3 5.2.1

nape: 2.0.16 2.0.19 [2.0.20]

openfl-admob: 1.4.1 [1.4.2]

openfl-gps-lib: 1.2.1 [1.4.3]

openfl-native: [1.4.0]

openfl: 2.0.1 3.5.3 [3.6.1] 5.0.0 5.1.2 5.1.5

swf: 1.8.9 2.1.6 [2.3.1]

posted 2017-12-13T03:41:50-08:00 | edited 2017-12-13T03:43:00-08:00
FGL_Kacper

FGL AdminCommunity Level 0
21 posts

Hello again!

Your ZeroCode issue may be caused by using AppLovin and HeyZap Mediation Preroll Ads. I'll ask a proper engineer to look into these SDKs and fix if needed.

I'm still working on the solution for your connector's problem, sorry for the  delay. We are hoping to make the library work with older versions of OpenFL/Lime, but at this point I can't guarantee we will succeed. I'll come back with more informations early next week!

Thanks for your patience,

Kacper

posted 2017-12-15T05:04:30-08:00
FGL_Kacper

FGL AdminCommunity Level 0
21 posts

Regarding the ZeroCode issue, our engineer looked into it and seems like you are using your own Google Analytics implementation, which is causing conflicts after Enhancing the app. The best solution would be to use Enhance to implement this SDK instead of doing it on your own.

The connector update is still work in progress, but the good news is that we should have it ready soon :)

posted 2017-12-19T16:15:24-08:00
FGL_Kacper

FGL AdminCommunity Level 0
21 posts

Hello!

The update is live now. Please download the connector and give it a try once again.

Let me know if you run into any issues.

Thanks!

posted 2017-12-21T04:29:32-08:00
Vasco_F

Market Level 6Community Level 1
59 posts

Hi,

Sorry for the late reply, it seems I'm not receiving email notifications of replies to this thread.

Thanks for looking into this. I ended up using another solution, but since I'm not that satisfied with it, I'll give this another try soon :)

posted 2017-12-26T04:04:49-08:00
Vasco_F

Market Level 6Community Level 1
59 posts

Well I tried it again and it works! Thank you for helping with the issues :)

There are a couple other issues that bother me, though.

The most problematic is the increase in the APK size after enhancing. My APK size is 9 MB bigger after enhancing, and the only options I chose were Interstitial Ads, AdMob mediation and Google analytics. That's an insane increase (I went from a 35MB APK to 44MB, a 26% increase), is there any way to reduce the file size?

The other issue is that the "track screen" feature of Google Analytics doesn't seem to be supported. I think I could live with that, but it would be a nice feature to include.

posted 2018-01-08T08:42:33-08:00
FGL_Kacper

FGL AdminCommunity Level 0
21 posts

Hello Vasco_F!

The APK size after Enhancing is dependent mostly on which and how many SDKs you have put in during the process. We do our best to add as less size to your app as possible, but all of the SDKs have their dependencies which they need to work correctly and in result increase your app's size.

Regarding the "track screen" feature, please keep in mind that Enhance is in active development and we will definitely consider adding this feature.

Thanks for you feedback and let me know if you have any further questions. :)

posted 2018-01-09T09:32:44-08:00 | edited 2018-01-09T09:33:26-08:00