-
Notifications
You must be signed in to change notification settings - Fork 62
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
Help building for Android ( arm64-v8a ) #32
Comments
So i recently tried again and I think the found the problem , build and ran logcat and it says the binary is in the wrong arch ( detected 32-bit instead of 64-bit ) : Failed to load native plugin: Unable to load library '/data/app/~~o9jQvhOgPc5UJHN2ln-qyQ==/com.nukadelic.imgui-Ly_fwrnvjyfFsQ2tyWJzkg==/lib/arm64/libcimgui.so', error 'java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/~~o9jQvhOgPc5UJHN2ln-qyQ==/com.nukadelic.imgui-Ly_fwrnvjyfFsQ2tyWJzkg==/lib/arm64/libcimgui.so" is 32-bit instead of 64-bit' was trying to build the .so - in cmake gui i specified the repository path and the output path according to unity ( https://docs.unity3d.com/2023.2/Documentation/Manual/android-sdksetup.html ) : ANDROID_PLATFORM=30
CMAKE_ANDROID_API=30
CMAKE_ANDROID_ARM_MODE=ON
BUILD_ARCH=ARM64
BUILD_CMAKE_GENERATOR_PLATFORM=ARM64
CMAKE_ANDROID_ARCH=arm64
CMAKE_ANDROID_ARCH_ABI=arm64-v8a Configure -> Generate Open console in build path ( .../cimgui/build-new ) and ran ninja to build , no errors. So i tried swapping the -match=armv7 to -match=arm64 , build and compiled - this time the 32bit error seem to went away , but the same DLL error is there ...
That's the change ☝️ , and that's the same error in the console when starting the apk :
Next i Have tried to switch match to
But looks like clang doesn't support it ? ....
Do i need a v8a llvm toolchain or something like this ? Or am I doing doing something fundamentally wrong ? |
Wasn't sure how to use the shell scripts so i tried using cmake-gui -downloaded and added ninja to path , selected the following toolchain :
D:\UnityHubEditors\2021.3.27f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\build\cmake\android.toolchain.cmake
used the following config :
source code location :
D:/GitClone/ImGui.NET-nativebuild/cimgui
- generated and build.so
file with ninja, renamed it to add alib
prefix and dropped intoAssets\Plugins\Android\libcimgui.so
with platform cpu target set to arm64 , and in project player settings android 11 ( api level 30 ) , IL2CPP backend and ARM64 target architecture , build the apk and made sure the.so
file was included by opening it as an archive with 7zip ( it was located alongside all the other.so
in\lib\arm64-v8a\libcimgui.so
).But it looks like it fails to load the library
The text was updated successfully, but these errors were encountered: