Getting Type not found : openfl.utils.JNI when compiling!

Hi,

i am getting this type not found error when compiling with [ extension-admob ] and have no clue how to fix it .

i tried to import the JNI in the AdMob.hx but no luck .

is there any workaround for this or an alternate ?

thanks

Please use lime.system.JNI instead

1 Like

thank you , yes it worked after upgrading to latest Open-fl build, it wasn’t doing anything before :stuck_out_tongue:

Edit :slight_smile:

just ended compiling after almost 5 minutes and now got this error :

 Error: File path too long on Windows, keep below 240 characters

running again with --stacktrace [no luck] in the desert :smiley:

Update:
well i think i had given it enough much time , will try it again when i get time , taking 5 minutes to just check and in the end same thing , how can i even reduce the path length i am no expert in this area :stuck_out_tongue:

For now you could try moving the project to another folder, or using a different <app path="" />?

1 Like

This is the exact issue that led me to make this pull request. Try adding this to project.xml:

<config:android gradle-build-directory="H:/Haxe/_HAXE - OpenFL/Android/Builds" />

Setting a build directory will save several characters, hopefully bringing you below 240. If that still isn’t short enough, maybe you could put it in H:/Haxe/Gradle Builds or something.

Thanks guys i am able to compile it successfully , i tried both ways and both worked, and @player_03 solution is really helpful.