As for me, OpenFL now generates one .apk with armv7a and arm64 libs.
And I simply stopped uploading any x86 version.
Just Change This line
I was able to upload multiple .apk files on Google Play Dev Console. One for 32 bit and One for 64 bit. The file sizes are decreased.
64-bit
> <architecture name="arm64" />
> <architecture exclude="armv7"/>
32-bit
> <architecture name="armv7"/>
> <architecture exclude="arm64"/>
Hey, Iām getting the same error noted above:
Error
This release is not compliant with the Google Play 64-bit requirement
The following APKs or App Bundles are available to 64-bit devices, but they only have 32-bit native code: 26.
Include 64-bit and 32-bit native code in your app. Use the Android App Bundle publishing format to automatically ensure that each device architecture receives only the native code it needs. This avoids increasing the overall size of your app. Learn More
This is with the following lines in my Project.xml (minus the spaces between < and architecture):
< architecture name=āarm64ā if=āandroidā />
< architecture exclude=āarmv7ā if=āandroidā />
Iām using:
Lime Command-Line Tools (6.4.0)
OpenFL Command-Line Tools (8.2.2-LWWQ62)
Do you know whether Iād need different versions of either of these? Something else in my Project.xml? Any other info that I can paste that would be useful?
You should upload two apk files at the same time using same versionNumber and different versionCode.
Thanks for the feedback. Iāve got a more fundamental question, unfortunately.
In the lime/OpenFL setup, how do I change the versionCode? I searched through the files and I see references to versionCode and VERSION_CODE, but canāt see a place where itās actually defined.
You shoud create your own manifest file
And add it to the project.xml. You can google for a basic Androidmanifest.xml file.
https://player03.com/2014/08/14/template-basics/
Thanks again. Iām leaving that issue aside from now and am looking to get a build up on Google Play that ājust worksā for beta testing ā meaning that, say, Iām fine with one huge bloated .apk if itāll get listed and Iāll optimize later. Iām also fine with only supporting 64-bit devices for now.
As I understand it, the lib directory in the .apk contains, well, the different versions of the libraries.
But even in including this:
<architecture name="arm64" if="android" />
I end up with lib/armeabi in my .apk, which I understand is a 32-bit library. My understanding is that Iād need to somehow include a arm64-v8a version instead. How can I go about that in the building process? Anything else I need in my Project.xml?
I believe this is incremented automatically with each build or can be manually overridden using <meta version="" />
. I think you also can force it on the command-line using --meta-version=
Is <architecture name="x86_64" />
supported?
I believe it would be <architecture name="x64" />
I think the current Lime should be all set up to configure this architecture properly but whether it builds depends upon the HXCPP toolchainā¦ it might not have been working fully last I tried?
EDIT: We do support ARM64 though and include it by default in Android builds, in-case thatās what youāre looking for
Yeah, that was what i was looking for!
But when i used it, liblime-x86_64.so
was missing. I had to hack Architecture.X64
into HXProject.hx
for the lime rebuild to create it
Iāve tried grabbing the latest lime and OpenFLā
Lime Command-Line Tools (7.7.0)
OpenFL Command-Line Tools (8.2.2-LpgCLS)
ā but Iām getting this:
Error: OpenFL 8.2.2 is not compatible with Lime 7.7.0 (version 6.4.* is required)
Is there some toolchain with versions of these that are compatible and that support arm64?
You can try adding -Ddisable-version-check
to allow OpenFL 8.2 to build with Lime 7.7 (Iām not sure if it would be compatible or not?) or changes from the Lime tools could be backported for an older release
No luck, unfortunately ā doesnāt look like lime 7.7.0 and OpenFL 8.2.2-LphCLS are compatible. But from what I can tell, itās due to something missing on the lime side that OpenFL now checks forā¦?
C:\HaxeToolkit\haxe\haxelib run lime build āproject.xmlā android -64 -Ddisable-version-check C:/HaxeToolkit/haxe/lib/openfl/8,2,2/src/openfl/display/Stage.hx:7: characters 7-25 : Type not found : lime.app.Preloader
If I run through Stage.hx and simply comment out whatās missing, it looks like there are three packages OpenFL canāt find:
lime.app.Preloader;
lime.graphics.Renderer;
lime.ui.Mouse in LimeMouse;
And then, of course, past that, other files break (e.g. DisplayObject.hx canāt find lime.graphics.utils.ImageCanvasUtil), which is to be expectedā¦
Have you tried a newer OpenFL version with your app?
I thought I was using the latest but I wasnāt ā .dev specified 8.2.2 and .current specified the latest (8.9.6), so I had to make sure I was using .current. Thanks for the catch.
With 8.9.6, it gets farther.
Link: libApplicationMain-v7.so
Error: Source path āC:/HaxeToolkit/haxe/lib/lime/7,7,0/ndll/Android/liblime-x86_64.soā does not exist
In that directory, I have a liblime-64.so among others, though. Iām not sure why itās trying to include an x86_64, since Iāve specified
<architecture name="arm64" if="android" />
and the output seems to verify that itās using armā¦?:
C:\HaxeToolkit\haxe\haxelib run lime build āproject.xmlā android -64
Creating C:/Users/greed/Documents/Temp/lst/builds/export-released/android/obj/obj/android-v7/__pch/haxe/hxcpp.h.gchā¦Compiling group: haxe
arm-linux-androideabi-g++ -Iinclude --sysroot=C:\Users\greed\AppData\Local\Android\ndk\android-ndk-r10e/platforms/android-16/arch-arm -IC:\Users\greed\AppData\Local\Android\ndk\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/include -IC:\Users\greed\AppData\Local\Android\ndk\android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi/include -DHXCPP_ARMV7 -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=331(haxe) -IC:/HaxeToolkit/haxe/lib/hxcpp/4,0,64/include -Iinclude -fpic -fvisibility=hidden -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -Wno-overflow -D_LINUX_STDDEF_H -Wno-psabi -DHXCPP_CPP11 -DHXCPP_ARMV7 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -fomit-frame-pointer -fexceptions -fno-strict-aliasing -finline-limit=10000 -DANDROID=ANDROID -DHX_ANDROID -DHXCPP_ANDROID_PLATFORM=16 -Wa,ānoexecstack -O2 -DNDEBUG -c ā¦ tags=[haxe,static]
- src/__ASSET__levels_dlc_5_tmx.cpp
- src/openfl/system/SecurityDomain.cpp [haxe,release]
But the error leads me to this thread: Does openfl support 64-bit devices on Android?, though it also seems to deal with x86_64.
We donāt include x86_64 builds for Android in the Lime releases right now. Could someone using the dev version of Lime try lime rebuild android -64
and see if it works with the current version of HXCPP?
Works like a charm with hxcpp: [4.0.64]
In toying around, I think Iāve got a better understanding of whatās going on here:
From what I can tell, limeās including -v7.so as it shouldā¦ but itās also trying to include -x86_64.so and it sounds like it shouldnāt be. Is my interpretation correct? Is that what it should be doing, or should we expect a different sort of behavior?
Iām currently running through building the dev version of lime (branch ādevelopā) and will try that as well when I can.